CPP: Exclude unusual header files such as config.h.

This commit is contained in:
Geoffrey White
2019-04-11 11:28:45 +01:00
parent f381768a1e
commit 2c0ccf4a85
2 changed files with 1 additions and 3 deletions

View File

@@ -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
}

View File

@@ -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 |