Skip to content

Commit 794e97a

Browse files
Reuse implementation_scope schema, detailed items for 1.5
1 parent cca63e4 commit 794e97a

File tree

2 files changed

+28
-22
lines changed

2 files changed

+28
-22
lines changed

rule_packages/c/Language4.json

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,17 @@
4646
],
4747
"title": "Obsolencent language features shall not be used",
4848
"implementation_scope": {
49-
"description": "Usage of obsolescent language features that are already disallowed by Rule 8.2, Rule 8.8, and 21.6 are not redundantly checked by this rule."
49+
"description": "Not all items from Appendix F are covered by this rule. Some are not supportable and some are covered already by other rules.",
50+
"items": [
51+
"Appendix F, item ID 1 is covered by Rule 8.8 and not reported as part of this implementation of Rule 1.5.",
52+
"Appendix F, item ID 2 refers to compiler behavior which cannot be statically analyzed.",
53+
"Appendix F, item ID 3, which states that storage-class specifiers may not be used except in the beginning of a declaration, is not supportable without additional changes to the CodeQL CLI.",
54+
"Appendix F, item ID 6 is reported for all C versions, though the macro ATOMIC_VAR_INIT was not officially declared obsolescent until C18.",
55+
"Appendix F, item IDs 4 and 5 are covered by Rule 8.2 and not reported as part of this implementation of Rule 1.5.",
56+
"Appendix F, item IDs 8 and 9 is covered by Rule 21.6 and not reported as part of this implementation of Rule 1.5.",
57+
"Appendix F, item ID 10 is checked by this implementation of 1.5, though it is a redundant subset of cases reported by Rule 21.3.",
58+
"Appendix F, item ID 10 is reported for all C versions, as realloc() with a size argument of zero was implementation-defined behavior in C99 and C11."
59+
]
5060
}
5161
}
5262
}

schemas/rule-package.schema.json

Lines changed: 17 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -209,16 +209,7 @@
209209
"type": "string"
210210
},
211211
"implementation_scope": {
212-
"type": "object",
213-
"properties": {
214-
"description": {
215-
"type": "string"
216-
}
217-
},
218-
"required": [
219-
"description"
220-
],
221-
"additionalProperties": false
212+
"$ref": "#/$defs/implementation_scope"
222213
}
223214
},
224215
"required": [
@@ -360,6 +351,20 @@
360351
"minLength": 1
361352
},
362353
"implementation_scope": {
354+
"$ref": "#/$defs/implementation_scope"
355+
}
356+
},
357+
"required": [
358+
"description",
359+
"name",
360+
"precision",
361+
"severity",
362+
"short_name",
363+
"tags"
364+
]
365+
},
366+
"implementation_scope": {
367+
"$id": "/schemas/implementation_scope",
363368
"type": "object",
364369
"properties": {
365370
"description": {
@@ -374,17 +379,8 @@
374379
},
375380
"required": [
376381
"description"
377-
]
382+
],
383+
"additionalProperties": false
378384
}
379-
},
380-
"required": [
381-
"description",
382-
"name",
383-
"precision",
384-
"severity",
385-
"short_name",
386-
"tags"
387-
]
388-
}
389385
}
390386
}

0 commit comments

Comments
 (0)