Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit a27d650

Browse filesBrowse files
committed
Declarations4: fix rule metadata files
1 parent bbbbd3b commit a27d650
Copy full SHA for a27d650

File tree

Expand file treeCollapse file tree

2 files changed

+14
-8
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+14
-8
lines changed

‎cpp/common/src/codingstandards/cpp/exclusions/c/Declarations4.qll

Copy file name to clipboardExpand all lines: cpp/common/src/codingstandards/cpp/exclusions/c/Declarations4.qll
+13-7Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,54 +11,60 @@ newtype Declarations4Query =
1111
TCompatibleDeclarationFunctionDefinedQuery() or
1212
TIdentifierWithExternalLinkageOneDefinitionQuery()
1313

14-
predicate isDeclarations4QueryMetadata(Query query, string queryId, string ruleId) {
14+
predicate isDeclarations4QueryMetadata(Query query, string queryId, string ruleId, string category) {
1515
query =
1616
// `Query` instance for the `functionTypesNotInPrototypeForm` query
1717
Declarations4Package::functionTypesNotInPrototypeFormQuery() and
1818
queryId =
1919
// `@id` for the `functionTypesNotInPrototypeForm` query
2020
"c/misra/function-types-not-in-prototype-form" and
21-
ruleId = "RULE-8-2"
21+
ruleId = "RULE-8-2" and
22+
category = "required"
2223
or
2324
query =
2425
// `Query` instance for the `declarationsOfAnObjectSameNameAndType` query
2526
Declarations4Package::declarationsOfAnObjectSameNameAndTypeQuery() and
2627
queryId =
2728
// `@id` for the `declarationsOfAnObjectSameNameAndType` query
2829
"c/misra/declarations-of-an-object-same-name-and-type" and
29-
ruleId = "RULE-8-3"
30+
ruleId = "RULE-8-3" and
31+
category = "required"
3032
or
3133
query =
3234
// `Query` instance for the `declarationsOfAFunctionSameNameAndType` query
3335
Declarations4Package::declarationsOfAFunctionSameNameAndTypeQuery() and
3436
queryId =
3537
// `@id` for the `declarationsOfAFunctionSameNameAndType` query
3638
"c/misra/declarations-of-a-function-same-name-and-type" and
37-
ruleId = "RULE-8-3"
39+
ruleId = "RULE-8-3" and
40+
category = "required"
3841
or
3942
query =
4043
// `Query` instance for the `compatibleDeclarationObjectDefined` query
4144
Declarations4Package::compatibleDeclarationObjectDefinedQuery() and
4245
queryId =
4346
// `@id` for the `compatibleDeclarationObjectDefined` query
4447
"c/misra/compatible-declaration-object-defined" and
45-
ruleId = "RULE-8-4"
48+
ruleId = "RULE-8-4" and
49+
category = "required"
4650
or
4751
query =
4852
// `Query` instance for the `compatibleDeclarationFunctionDefined` query
4953
Declarations4Package::compatibleDeclarationFunctionDefinedQuery() and
5054
queryId =
5155
// `@id` for the `compatibleDeclarationFunctionDefined` query
5256
"c/misra/compatible-declaration-function-defined" and
53-
ruleId = "RULE-8-4"
57+
ruleId = "RULE-8-4" and
58+
category = "required"
5459
or
5560
query =
5661
// `Query` instance for the `identifierWithExternalLinkageOneDefinition` query
5762
Declarations4Package::identifierWithExternalLinkageOneDefinitionQuery() and
5863
queryId =
5964
// `@id` for the `identifierWithExternalLinkageOneDefinition` query
6065
"c/misra/identifier-with-external-linkage-one-definition" and
61-
ruleId = "RULE-8-6"
66+
ruleId = "RULE-8-6" and
67+
category = "required"
6268
}
6369

6470
module Declarations4Package {

‎cpp/common/src/codingstandards/cpp/exclusions/c/RuleMetadata.qll

Copy file name to clipboardExpand all lines: cpp/common/src/codingstandards/cpp/exclusions/c/RuleMetadata.qll
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ predicate isQueryMetadata(Query query, string queryId, string ruleId, string cat
9393
isDeclarations1QueryMetadata(query, queryId, ruleId, category) or
9494
isDeclarations2QueryMetadata(query, queryId, ruleId, category) or
9595
isDeclarations3QueryMetadata(query, queryId, ruleId, category) or
96-
isDeclarations4QueryMetadata(query, queryId, ruleId) or
96+
isDeclarations4QueryMetadata(query, queryId, ruleId, category) or
9797
isExpressionsQueryMetadata(query, queryId, ruleId, category) or
9898
isIO1QueryMetadata(query, queryId, ruleId, category) or
9999
isIO2QueryMetadata(query, queryId, ruleId, category) or

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.