Skip to content

Commit 42adff5

Browse files
Formatting & json validation
1 parent 713c675 commit 42adff5

File tree

4 files changed

+7
-10
lines changed

4 files changed

+7
-10
lines changed

c/common/src/codingstandards/c/SubObjects.qll

+3-7
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,10 @@ class SubObject extends TSubObject {
4444

4545
/**
4646
* Holds for object roots and for member accesses on that root, not for array accesses.
47-
*
47+
*
4848
* This is useful for cases where we do not wish to treat `x[y]` and `x[z]` as the same object.
4949
*/
50-
predicate isPrecise() {
51-
not getParent*() = TObjectIndex(_)
52-
}
50+
predicate isPrecise() { not getParent*() = TObjectIndex(_) }
5351

5452
SubObject getParent() {
5553
exists(SubObject struct, MemberVariable m |
@@ -79,9 +77,7 @@ class SubObject extends TSubObject {
7977
result.(ArrayExpr).getArrayBase() = getParent().getAnAccess()
8078
}
8179

82-
AddressOfExpr getAnAddressOfExpr() {
83-
result.getOperand() = this.getAnAccess()
84-
}
80+
AddressOfExpr getAnAddressOfExpr() { result.getOperand() = this.getAnAccess() }
8581

8682
ObjectIdentity getRootIdentity() {
8783
exists(ObjectIdentity i |

c/common/src/codingstandards/c/initialization/GlobalInitializationAnalysis.qll

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import codingstandards.cpp.Concurrency
44
import codingstandards.cpp.Type
55

66
signature module GlobalInitializationAnalysisConfigSig {
7-
/** A function which is not called or started as a thread */
7+
/** A function which is not called or started as a thread */
88
default predicate isRootFunction(Function f) {
99
not exists(Function f2 | f2.calls(f)) and
1010
not f instanceof ThreadedFunction

rule_packages/c/Concurrency9.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
},
2828
"queries": [
2929
{
30-
"description": "Thread synchronization objects and thread-specific storage pointers shall not be destroyed until after all threads accessing them have terminated",
30+
"description": "Thread synchronization objects and thread-specific storage pointers shall not be destroyed until after all threads accessing them have terminated.",
3131
"kind": "problem",
3232
"name": "Thread synchronization objects and thread-specific storage pointers shall not be disposed unsafely",
3333
"precision": "medium",
@@ -92,7 +92,7 @@
9292
"correctness",
9393
"concurrency",
9494
"external/misra/c/2012/amendment4",
95-
"audit"
95+
"external/misra/audit"
9696
]
9797
}
9898
],

schemas/rule-package.schema.json

+1
Original file line numberDiff line numberDiff line change
@@ -342,6 +342,7 @@
342342
"external/autosar/strict",
343343
"scope/single-translation-unit",
344344
"scope/system",
345+
"external/misra/audit",
345346
"external/misra/c/2012/third-edition-first-revision",
346347
"external/misra/c/2012/amendment2",
347348
"external/misra/c/2012/amendment3",

0 commit comments

Comments
 (0)