Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- `DIR-4-10`, `M16-2-3`, and `RULE-19-2-1`:
- Header files matched by a configured exclusion are no longer reported.
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ class BlockedIncludeGuard extends HeaderFile {
}

query predicate problems(HeaderFile file, string message, HeaderFile other, string name) {
not isExcluded(file, getQuery()) and
Comment thread
mbaluda marked this conversation as resolved.
not file instanceof CorrectIncludeGuard and
if file instanceof BlockedIncludeGuard
then
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
| headers/test4.hpp:0:0:0:0 | headers/test4.hpp | Header file test4.hpp is missing expected include guard. | headers/test4.hpp:0:0:0:0 | headers/test4.hpp | |
| headers/test5.hpp:0:0:0:0 | headers/test5.hpp | Header file test5.hpp is missing expected include guard. | headers/test5.hpp:0:0:0:0 | headers/test5.hpp | |
| headers/test6.hpp:0:0:0:0 | headers/test6.hpp | Header file test6.hpp is missing expected include guard. | headers/test6.hpp:0:0:0:0 | headers/test6.hpp | |
| headers/test7.hpp:0:0:0:0 | headers/test7.hpp | Header file test7.hpp is missing expected include guard. | headers/test7.hpp:0:0:0:0 | headers/test7.hpp | |
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?xml version="1.0" ?>
<codingstandards>
<!--GENERATED: DO NOT MODIFY. Changes should be made to coding-standards.yml instead.-->
<deviations>
<deviations-entry>
<rule-id>cpp-test-dummy</rule-id>
<justification>This header is deliberately excluded to test the exclusion mechanism.</justification>
</deviations-entry>
</deviations>
</codingstandards>
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
deviations:
- rule-id: cpp-test-dummy
justification: This header is deliberately excluded to test the exclusion mechanism.
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
// COMPLIANT - excluded via deviation
int g7;
2 changes: 2 additions & 0 deletions cpp/common/test/rules/includeguardsnotused/headers/test7.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
// NON_COMPLIANT
int g6;
6 changes: 5 additions & 1 deletion cpp/common/test/rules/includeguardsnotused/test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,8 @@

#include "headers/test5.hpp" //COMPLIANT - non unique precedes malformed

#include "headers/test6.hpp" //COMPLIANT - non unique
#include "headers/test6.hpp" //COMPLIANT - non unique

#include "headers/test7.hpp" //NON_COMPLIANT - missing include guard, not excluded

#include "headers/excluded/test7.hpp" // COMPLIANT - excluded via deviation
Loading