mirror of
https://github.com/github/codeql.git
synced 2026-04-25 00:35:20 +02:00
Merge pull request #15265 from github/redsun82/def-to-non-header-include-exceptions
C++: add `.def` to exceptions to AV rule 32
This commit is contained in:
@@ -0,0 +1,4 @@
|
||||
---
|
||||
category: minorAnalysis
|
||||
---
|
||||
* The `cpp/include-non-header` style query will now ignore the `.def` extension for textual header inclusions.
|
||||
@@ -18,6 +18,7 @@ from Include i, File f, string extension
|
||||
where
|
||||
f = i.getIncludedFile() and
|
||||
extension = f.getExtension().toLowerCase() and
|
||||
extension != "def" and
|
||||
extension != "inc" and
|
||||
extension != "inl" and
|
||||
extension != "tcc" and
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
#include "test.H"
|
||||
#include "test.xpm"
|
||||
#include "test2.c"
|
||||
#include "test.H" // GOOD
|
||||
#include "test.xpm" // GOOD
|
||||
#include "test2.c" // BAD
|
||||
#include "test.def" // GOOD
|
||||
|
||||
Reference in New Issue
Block a user