@@ -24,158 +24,177 @@ newtype BannedQuery =
24
24
TOctalConstantsUsedQuery ( ) or
25
25
TRestrictTypeQualifierUsedQuery ( )
26
26
27
- predicate isBannedQueryMetadata ( Query query , string queryId , string ruleId ) {
27
+ predicate isBannedQueryMetadata ( Query query , string queryId , string ruleId , string category ) {
28
28
query =
29
29
// `Query` instance for the `doNotCallSystem` query
30
30
BannedPackage:: doNotCallSystemQuery ( ) and
31
31
queryId =
32
32
// `@id` for the `doNotCallSystem` query
33
33
"c/cert/do-not-call-system" and
34
- ruleId = "ENV33-C"
34
+ ruleId = "ENV33-C" and
35
+ category = "rule"
35
36
or
36
37
query =
37
38
// `Query` instance for the `commaOperatorShouldNotBeUsed` query
38
39
BannedPackage:: commaOperatorShouldNotBeUsedQuery ( ) and
39
40
queryId =
40
41
// `@id` for the `commaOperatorShouldNotBeUsed` query
41
42
"c/misra/comma-operator-should-not-be-used" and
42
- ruleId = "RULE-12-3"
43
+ ruleId = "RULE-12-3" and
44
+ category = "advisory"
43
45
or
44
46
query =
45
47
// `Query` instance for the `featuresOfStdarghUsed` query
46
48
BannedPackage:: featuresOfStdarghUsedQuery ( ) and
47
49
queryId =
48
50
// `@id` for the `featuresOfStdarghUsed` query
49
51
"c/misra/features-of-stdargh-used" and
50
- ruleId = "RULE-17-1"
52
+ ruleId = "RULE-17-1" and
53
+ category = "required"
51
54
or
52
55
query =
53
56
// `Query` instance for the `unionKeywordShouldNotBeUsed` query
54
57
BannedPackage:: unionKeywordShouldNotBeUsedQuery ( ) and
55
58
queryId =
56
59
// `@id` for the `unionKeywordShouldNotBeUsed` query
57
60
"c/misra/union-keyword-should-not-be-used" and
58
- ruleId = "RULE-19-2"
61
+ ruleId = "RULE-19-2" and
62
+ category = "advisory"
59
63
or
60
64
query =
61
65
// `Query` instance for the `standardLibraryTimeAndDateFunctionsUsed` query
62
66
BannedPackage:: standardLibraryTimeAndDateFunctionsUsedQuery ( ) and
63
67
queryId =
64
68
// `@id` for the `standardLibraryTimeAndDateFunctionsUsed` query
65
69
"c/misra/standard-library-time-and-date-functions-used" and
66
- ruleId = "RULE-21-10"
70
+ ruleId = "RULE-21-10" and
71
+ category = "required"
67
72
or
68
73
query =
69
74
// `Query` instance for the `standardHeaderFileTgmathhUsed` query
70
75
BannedPackage:: standardHeaderFileTgmathhUsedQuery ( ) and
71
76
queryId =
72
77
// `@id` for the `standardHeaderFileTgmathhUsed` query
73
78
"c/misra/standard-header-file-tgmathh-used" and
74
- ruleId = "RULE-21-11"
79
+ ruleId = "RULE-21-11" and
80
+ category = "required"
75
81
or
76
82
query =
77
83
// `Query` instance for the `exceptionHandlingFeaturesOfFenvhUsed` query
78
84
BannedPackage:: exceptionHandlingFeaturesOfFenvhUsedQuery ( ) and
79
85
queryId =
80
86
// `@id` for the `exceptionHandlingFeaturesOfFenvhUsed` query
81
87
"c/misra/exception-handling-features-of-fenvh-used" and
82
- ruleId = "RULE-21-12"
88
+ ruleId = "RULE-21-12" and
89
+ category = "advisory"
83
90
or
84
91
query =
85
92
// `Query` instance for the `systemOfStdlibhUsed` query
86
93
BannedPackage:: systemOfStdlibhUsedQuery ( ) and
87
94
queryId =
88
95
// `@id` for the `systemOfStdlibhUsed` query
89
96
"c/misra/system-of-stdlibh-used" and
90
- ruleId = "RULE-21-21"
97
+ ruleId = "RULE-21-21" and
98
+ category = "required"
91
99
or
92
100
query =
93
101
// `Query` instance for the `memoryAllocDeallocFunctionsOfStdlibhUsed` query
94
102
BannedPackage:: memoryAllocDeallocFunctionsOfStdlibhUsedQuery ( ) and
95
103
queryId =
96
104
// `@id` for the `memoryAllocDeallocFunctionsOfStdlibhUsed` query
97
105
"c/misra/memory-alloc-dealloc-functions-of-stdlibh-used" and
98
- ruleId = "RULE-21-3"
106
+ ruleId = "RULE-21-3" and
107
+ category = "required"
99
108
or
100
109
query =
101
110
// `Query` instance for the `standardHeaderFileUsedSetjmph` query
102
111
BannedPackage:: standardHeaderFileUsedSetjmphQuery ( ) and
103
112
queryId =
104
113
// `@id` for the `standardHeaderFileUsedSetjmph` query
105
114
"c/misra/standard-header-file-used-setjmph" and
106
- ruleId = "RULE-21-4"
115
+ ruleId = "RULE-21-4" and
116
+ category = "required"
107
117
or
108
118
query =
109
119
// `Query` instance for the `standardHeaderFileUsedSignalh` query
110
120
BannedPackage:: standardHeaderFileUsedSignalhQuery ( ) and
111
121
queryId =
112
122
// `@id` for the `standardHeaderFileUsedSignalh` query
113
123
"c/misra/standard-header-file-used-signalh" and
114
- ruleId = "RULE-21-5"
124
+ ruleId = "RULE-21-5" and
125
+ category = "required"
115
126
or
116
127
query =
117
128
// `Query` instance for the `standardLibraryInputoutputFunctionsUsed` query
118
129
BannedPackage:: standardLibraryInputoutputFunctionsUsedQuery ( ) and
119
130
queryId =
120
131
// `@id` for the `standardLibraryInputoutputFunctionsUsed` query
121
132
"c/misra/standard-library-inputoutput-functions-used" and
122
- ruleId = "RULE-21-6"
133
+ ruleId = "RULE-21-6" and
134
+ category = "required"
123
135
or
124
136
query =
125
137
// `Query` instance for the `atofAtoiAtolAndAtollOfStdlibhUsed` query
126
138
BannedPackage:: atofAtoiAtolAndAtollOfStdlibhUsedQuery ( ) and
127
139
queryId =
128
140
// `@id` for the `atofAtoiAtolAndAtollOfStdlibhUsed` query
129
141
"c/misra/atof-atoi-atol-and-atoll-of-stdlibh-used" and
130
- ruleId = "RULE-21-7"
142
+ ruleId = "RULE-21-7" and
143
+ category = "required"
131
144
or
132
145
query =
133
146
// `Query` instance for the `terminationFunctionsOfStdlibhUsed` query
134
147
BannedPackage:: terminationFunctionsOfStdlibhUsedQuery ( ) and
135
148
queryId =
136
149
// `@id` for the `terminationFunctionsOfStdlibhUsed` query
137
150
"c/misra/termination-functions-of-stdlibh-used" and
138
- ruleId = "RULE-21-8"
151
+ ruleId = "RULE-21-8" and
152
+ category = "required"
139
153
or
140
154
query =
141
155
// `Query` instance for the `terminationMacrosOfStdlibhUsed` query
142
156
BannedPackage:: terminationMacrosOfStdlibhUsedQuery ( ) and
143
157
queryId =
144
158
// `@id` for the `terminationMacrosOfStdlibhUsed` query
145
159
"c/misra/termination-macros-of-stdlibh-used" and
146
- ruleId = "RULE-21-8"
160
+ ruleId = "RULE-21-8" and
161
+ category = "required"
147
162
or
148
163
query =
149
164
// `Query` instance for the `bsearchAndQsortOfStdlibhUsed` query
150
165
BannedPackage:: bsearchAndQsortOfStdlibhUsedQuery ( ) and
151
166
queryId =
152
167
// `@id` for the `bsearchAndQsortOfStdlibhUsed` query
153
168
"c/misra/bsearch-and-qsort-of-stdlibh-used" and
154
- ruleId = "RULE-21-9"
169
+ ruleId = "RULE-21-9" and
170
+ category = "required"
155
171
or
156
172
query =
157
173
// `Query` instance for the `stdLibDynamicMemoryAllocationUsed` query
158
174
BannedPackage:: stdLibDynamicMemoryAllocationUsedQuery ( ) and
159
175
queryId =
160
176
// `@id` for the `stdLibDynamicMemoryAllocationUsed` query
161
177
"c/misra/std-lib-dynamic-memory-allocation-used" and
162
- ruleId = "DIR-4-12"
178
+ ruleId = "DIR-4-12" and
179
+ category = "required"
163
180
or
164
181
query =
165
182
// `Query` instance for the `octalConstantsUsed` query
166
183
BannedPackage:: octalConstantsUsedQuery ( ) and
167
184
queryId =
168
185
// `@id` for the `octalConstantsUsed` query
169
186
"c/misra/octal-constants-used" and
170
- ruleId = "RULE-7-1"
187
+ ruleId = "RULE-7-1" and
188
+ category = "required"
171
189
or
172
190
query =
173
191
// `Query` instance for the `restrictTypeQualifierUsed` query
174
192
BannedPackage:: restrictTypeQualifierUsedQuery ( ) and
175
193
queryId =
176
194
// `@id` for the `restrictTypeQualifierUsed` query
177
195
"c/misra/restrict-type-qualifier-used" and
178
- ruleId = "RULE-8-14"
196
+ ruleId = "RULE-8-14" and
197
+ category = "required"
179
198
}
180
199
181
200
module BannedPackage {
0 commit comments