File tree 2 files changed +1
-41
lines changed
cpp/misra/src/rules/RULE-19-1-1
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
19
19
20
20
from PreprocessorIf ifDirective , MacroInvocation mi
21
21
where
22
- not isExcluded ( ifDirective , PreprocessorPackage:: macroDefinitionContainsDefinedOperatorQuery ( ) ) and
22
+ not isExcluded ( ifDirective , PreprocessorPackage:: definedOperatorExpandedInIfDirectiveQuery ( ) ) and
23
23
ifDirective .getLocation ( ) .subsumes ( mi .getLocation ( ) ) and
24
24
mi .getMacro ( ) .getBody ( ) .regexpMatch ( ".*defined.*" )
25
25
select ifDirective ,
Original file line number Diff line number Diff line change 98
98
}
99
99
],
100
100
"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"
141
101
}
142
102
}
143
103
}
You can’t perform that action at this time.
0 commit comments