File tree Expand file tree Collapse file tree 2 files changed +1
-41
lines changed
cpp/misra/src/rules/RULE-19-1-1 Expand file tree Collapse file tree 2 files changed +1
-41
lines changed Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ import codingstandards.cpp.misra
1919
2020from PreprocessorIf ifDirective , MacroInvocation mi
2121where
22- not isExcluded ( ifDirective , PreprocessorPackage:: macroDefinitionContainsDefinedOperatorQuery ( ) ) and
22+ not isExcluded ( ifDirective , PreprocessorPackage:: definedOperatorExpandedInIfDirectiveQuery ( ) ) and
2323 ifDirective .getLocation ( ) .subsumes ( mi .getLocation ( ) ) and
2424 mi .getMacro ( ) .getBody ( ) .regexpMatch ( ".*defined.*" )
2525select ifDirective ,
Original file line number Diff line number Diff line change 9898 }
9999 ],
100100 "title" : " The #include directive shall be followed by either a <filename> or \" filename\" sequence"
101- },
102- "RULE-19-3-4" : {
103- "properties" : {
104- "enforcement" : " decidable" ,
105- "obligation" : " required"
106- },
107- "queries" : [
108- {
109- "description" : " " ,
110- "kind" : " problem" ,
111- "name" : " Parentheses shall be used to ensure macro arguments are expanded appropriately" ,
112- "precision" : " very-high" ,
113- "severity" : " error" ,
114- "short_name" : " ParenthesesNotUsedToEnsureMacroArgumentsAreExpandedAppropriately" ,
115- "tags" : [
116- " scope/single-translation-unit"
117- ]
118- }
119- ],
120- "title" : " Parentheses shall be used to ensure macro arguments are expanded appropriately"
121- },
122- "RULE-19-6-1" : {
123- "properties" : {
124- "enforcement" : " decidable" ,
125- "obligation" : " advisory"
126- },
127- "queries" : [
128- {
129- "description" : " " ,
130- "kind" : " problem" ,
131- "name" : " The #pragma directive and the _Pragma operator should not be used" ,
132- "precision" : " very-high" ,
133- "severity" : " error" ,
134- "short_name" : " PragmaDirectiveAndThePragmaOperatorShouldNotBeUsed" ,
135- "tags" : [
136- " scope/single-translation-unit"
137- ]
138- }
139- ],
140- "title" : " The #pragma directive and the _Pragma operator should not be used"
141101 }
142102 }
143103}
You can’t perform that action at this time.
0 commit comments