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:
Paolo Tranquilli
2024-01-11 08:34:43 +01:00
committed by GitHub
4 changed files with 9 additions and 3 deletions

View File

@@ -0,0 +1,4 @@
---
category: minorAnalysis
---
* The `cpp/include-non-header` style query will now ignore the `.def` extension for textual header inclusions.

View File

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

View File

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