`RULE-10-0-1`: Structured bindings should not be reported as violations
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 72/100
Research direction
Find the implementations and tests for RULE-10-0-1 and M8-0-1, then inspect how variable declarations are classified. Use Variable.isStructuredBinding to identify the shown C++ case, and verify that the structured-binding example is no longer reported while other violations remain covered by tests.
Written by the indexing model from the issue text.
Description
Affected rules
RULE-10-0-1M8-0-1
Description
The examples for rule 10-0-1 specifically say that structured bindings are not a violation.
We can detect these with Variable.isStructuredBinding.
Example
void example_function(std::pair<int, long> p) {
auto [i, l] = p; // COMPLIANT[False positive]
}
- Dominant language
- CodeQL
- Stars
- 227
- Forks
- 82
- Avg merge
- 6d 7h
- Merged PRs (30d)
- 9
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from github/codeql-coding-standards
-
Difficulty-Low false positive/false negative false-negative Impact-Low Standard-MISRA-C
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Difficulty-Medium false positive/false negative false-positive Impact-Medium Standard-CERT-C
Difficulty 4/5 3-5 days Newbie friendliness 48/100
github/codeql-coding-standards#1200 ·
-
`RULE-0-0-1`: "unreachable statement" false positives due to over-pruning of the control-flow graph Openfalse positive/false negative
Difficulty 4/5 3-5 days Newbie friendliness 48/100
github/codeql-coding-standards#1190 ·
-
false positive/false negative
Difficulty 3/5 1-2 days Newbie friendliness 65/100
github/codeql-coding-standards#1175 ·
-
false positive/false negative Stardard-MISRA-C++
Difficulty 3/5 1-2 days Newbie friendliness 48/100
github/codeql-coding-standards#1165 ·
All issues in github/codeql-coding-standards
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
hemilabs/ui-monorepo#2332 ·
-
Help-Wanted Needs-Triage Package-Update
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
microsoft/winget-pkgs#438662 ·
-
priority: p3
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
googleapis/librarian#7636 ·
-
bug good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
olcf/olcf-test-harness#278 · 1 comment ·