mirror of
https://github.com/github/codeql.git
synced 2026-05-01 03:35:13 +02:00
C++: Relax commented-out code heuristic for }
I looked through a few hundred results from this query on lgtm.com and found that most of the FPs had to do with comment lines ending in `}`. This change should fix most of them, at the cost of very few false negatives. On Wireshark, this query goes from 7,425 results to 6,686 results before filtering for generated code. Almost all the lost results were FP, except a handful of results involving initializer lists.
This commit is contained in:
@@ -1,6 +1,3 @@
|
||||
| test2.cpp:13:1:13:33 | /* JSON example: {"foo":"bar"} */ | This comment appears to contain commented-out code |
|
||||
| test2.cpp:33:1:33:17 | // { 1, 2, 3, 4 } | This comment appears to contain commented-out code |
|
||||
| test2.cpp:35:1:35:26 | // Example: { 1, 2, 3, 4 } | This comment appears to contain commented-out code |
|
||||
| test2.cpp:37:1:37:39 | // int myFunction() { return myValue; } | This comment appears to contain commented-out code |
|
||||
| test.c:2:1:2:22 | // commented out code; | This comment appears to contain commented-out code |
|
||||
| test.c:4:1:7:8 | // some; | This comment appears to contain commented-out code |
|
||||
|
||||
Reference in New Issue
Block a user