`M0-1-2` - `A3-1-5` - `A4-5-1` - `M0-1-1` : Poor lambda support
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
Research direction
Start by reproducing the C++ lambda examples for rules M0-1-2, A3-1-5, A4-5-1, and M0-1-1, then inspect the implementations of those affected rules. Done means the shown lambda cases no longer produce false alerts while the rules still report applicable violations.
Written by the indexing model from the issue text.
Description
Affected rules
- M0-1-2
- A3-1-5
- A4-5-1
- M0-1-1
Description
Using lambda expression trigger various side effects alerts.
Example
A3-1-5
const auto lambda = []() -> void {} // Trigger A3-1-5
A4-5-1
enum Enum { A, B };
const auto lambda = [](const Enum e) -> void {}
const auto e = Enum::A;
lambda(e); // Triggers A4-5-1
M0-1-1 / M0-1-2
std::uint32_t u32{0};
const auto lambda = [&u32]() -> void {
++u32;
}
lambda();
if (u32 == 0) { // Triggers M0-1-2
return;
}
foo(); // (could be any expression) Triggers M0-1-1
- 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
-
false positive/false negative Stardard-MISRA-C++
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
github/codeql-coding-standards#1172 ·
-
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 ·
All issues in github/codeql-coding-standards
Similar issues
-
ZCode 3.14.3 に対応する Open
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
supermomonga/zcode-acp#24 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
learningequality/ricecooker#747 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
KhronosGroup/glTF-Blender-IO#2769 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100