chore: add [[nodiscard]] attribute to relevant methods for better optimization and added std::move where needed#299
Conversation
…imization and added std::move where needed
✅
|
| Descriptor | Linter | Files | Fixed | Errors | Warnings | Elapsed time |
|---|---|---|---|---|---|---|
| ✅ ACTION | actionlint | 6 | 0 | 0 | 0.03s | |
| ✅ CPP | clang-format | 229 | 0 | 0 | 0 | 1.6s |
| ✅ DOCKERFILE | hadolint | 1 | 0 | 0 | 0.03s | |
| ✅ JSON | jsonlint | 8 | 0 | 0 | 0.4s | |
| ✅ JSON | prettier | 8 | 6 | 0 | 0 | 0.49s |
| markdownlint | 6 | 3 | 16 | 0 | 1.03s | |
| ✅ MARKDOWN | markdown-table-formatter | 6 | 3 | 0 | 0 | 0.28s |
| ✅ REPOSITORY | git_diff | yes | no | no | 0.01s | |
| ✅ REPOSITORY | grype | yes | no | no | 39.31s | |
| ✅ REPOSITORY | ls-lint | yes | no | no | 0.1s | |
| ✅ REPOSITORY | secretlint | yes | no | no | 4.0s | |
| ✅ REPOSITORY | syft | yes | no | no | 1.51s | |
| ✅ REPOSITORY | trivy | yes | no | no | 11.27s | |
| ✅ REPOSITORY | trivy-sbom | yes | no | no | 0.35s | |
| ✅ REPOSITORY | trufflehog | yes | no | no | 5.51s | |
| lychee | 83 | 1 | 0 | 3.98s | ||
| ✅ YAML | prettier | 10 | 0 | 0 | 0 | 0.6s |
| ✅ YAML | v8r | 10 | 0 | 0 | 8.67s | |
| ✅ YAML | yamllint | 10 | 0 | 0 | 0.54s |
Detailed Issues
⚠️ SPELL / lychee - 1 error
[404] https://github.com/yourname/amp-cucumber-cpp-runner.git | Network error: Not Found
📝 Summary
---------------------
🔍 Total..........158
✅ Successful.....157
⏳ Timeouts.........0
🔀 Redirected.......0
👻 Excluded.........0
❓ Unknown..........0
🚫 Errors...........1
Errors in CONTRIBUTING.md
[404] https://github.com/yourname/amp-cucumber-cpp-runner.git | Network error: Not Found
⚠️ MARKDOWN / markdownlint - 16 errors
CHANGELOG.md:30 error MD024/no-duplicate-heading Multiple headings with the same content [Context: "Features"]
CHANGELOG.md:37 error MD024/no-duplicate-heading Multiple headings with the same content [Context: "Chores"]
CHANGELOG.md:45 error MD024/no-duplicate-heading Multiple headings with the same content [Context: "⚠ BREAKING CHANGES"]
CHANGELOG.md:49 error MD024/no-duplicate-heading Multiple headings with the same content [Context: "Features"]
CHANGELOG.md:58 error MD024/no-duplicate-heading Multiple headings with the same content [Context: "Features"]
CHANGELOG.md:64 error MD024/no-duplicate-heading Multiple headings with the same content [Context: "Chores"]
CHANGELOG.md:72 error MD024/no-duplicate-heading Multiple headings with the same content [Context: "⚠ BREAKING CHANGES"]
CHANGELOG.md:76 error MD024/no-duplicate-heading Multiple headings with the same content [Context: "Features"]
CHANGELOG.md:81 error MD024/no-duplicate-heading Multiple headings with the same content [Context: "Bug Fixes"]
CHANGELOG.md:90 error MD024/no-duplicate-heading Multiple headings with the same content [Context: "Features"]
CHANGELOG.md:101 error MD024/no-duplicate-heading Multiple headings with the same content [Context: "Chores"]
CHANGELOG.md:109 error MD024/no-duplicate-heading Multiple headings with the same content [Context: "⚠ BREAKING CHANGES"]
CHANGELOG.md:113 error MD024/no-duplicate-heading Multiple headings with the same content [Context: "Features"]
CHANGELOG.md:138 error MD024/no-duplicate-heading Multiple headings with the same content [Context: "Bug Fixes"]
CHANGELOG.md:145 error MD024/no-duplicate-heading Multiple headings with the same content [Context: "Chores"]
README.md:114 error MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"]
See detailed reports in MegaLinter artifacts
Your project could benefit from a custom flavor, which would allow you to run only the linters you need, and thus improve runtime performances. (Skip this info by defining FLAVOR_SUGGESTIONS: false)
- Documentation: Custom Flavors
- Command:
npx mega-linter-runner@9.4.0 --custom-flavor-setup --custom-flavor-linters ACTION_ACTIONLINT,CPP_CLANG_FORMAT,DOCKERFILE_HADOLINT,JSON_JSONLINT,JSON_PRETTIER,MARKDOWN_MARKDOWNLINT,MARKDOWN_MARKDOWN_TABLE_FORMATTER,REPOSITORY_GIT_DIFF,REPOSITORY_GRYPE,REPOSITORY_LS_LINT,REPOSITORY_SECRETLINT,REPOSITORY_SYFT,REPOSITORY_TRIVY,REPOSITORY_TRIVY_SBOM,REPOSITORY_TRUFFLEHOG,SPELL_LYCHEE,YAML_PRETTIER,YAML_YAMLLINT,YAML_V8R

Show us your support by starring ⭐ the repository
There was a problem hiding this comment.
Pull request overview
This PR strengthens API usage correctness in the query subsystem by marking many Query/Lineage accessors as [[nodiscard]], and adjusts Lineage’s operator+ helpers to use move-assignment into stored std::shared_ptrs while returning by value without inhibiting copy elision.
Changes:
- Add
[[nodiscard]]toLineagenaming helpers and a broad set ofQuerylookup/accessor methods. - Update
Lineage’soperator+overloads tostd::moveincomingstd::shared_ptrparameters into members and returnlineagedirectly.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|



No description provided.