mirror of
https://github.com/github/codeql.git
synced 2026-05-01 03:35:13 +02:00
CPP: Exclude unusual header files such as config.h.
This commit is contained in:
@@ -156,6 +156,7 @@ class CommentBlock extends Comment {
|
||||
|
||||
predicate isCommentedOutCode() {
|
||||
not this.isDocumentation() and
|
||||
not this.getFile().(HeaderFile).noTopLevelCode() and
|
||||
this.numCodeLines().(float) / this.numLines().(float) > 0.5
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
| config.h:9:1:9:18 | //#define SETTING3 | This comment appears to contain commented-out code |
|
||||
| config.h:12:1:12:22 | /* #define SETTING4 */ | This comment appears to contain commented-out code |
|
||||
| config.h:19:1:19:21 | /* #undef SETTING5 */ | 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 |
|
||||
| test2.cpp:39:1:39:45 | // int myFunction() const { return myValue; } | This comment appears to contain commented-out code |
|
||||
| test2.cpp:41:1:41:54 | // int myFunction() const noexcept { return myValue; } | This comment appears to contain commented-out code |
|
||||
|
||||
Reference in New Issue
Block a user