-
Notifications
You must be signed in to change notification settings - Fork 76
Expand file tree
/
Copy pathContracts.json
More file actions
89 lines (89 loc) · 3.76 KB
/
Contracts.json
File metadata and controls
89 lines (89 loc) · 3.76 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
{
"CERT-C": {
"MSC40-C": {
"properties": {
"obligation": "rule"
},
"queries": [
{
"description": "Inlined external functions are prohibited by the language standard from defining modifiable static or thread storage objects, or referencing identifiers with internal linkage.",
"kind": "problem",
"name": "Do not violate inline linkage constraints",
"precision": "very-high",
"severity": "error",
"short_name": "DoNotViolateInLineLinkageConstraints",
"tags": [
"correctness"
],
"implementation_scope": {
"description": "This query only considers the constraints related to inline extern functions."
}
}
],
"title": "Do not violate constraints"
}
},
"MISRA-C-2012": {
"DIR-4-11": {
"properties": {
"obligation": "required"
},
"queries": [
{
"description": "Range, domain or pole errors in math functions may return unexpected values, trigger floating-point exceptions or set unexpected error modes.",
"kind": "problem",
"name": "The validity of values passed to `math.h` library functions shall be checked",
"precision": "high",
"severity": "error",
"short_name": "CheckMathLibraryFunctionParameters",
"shared_implementation_short_name": "UncheckedRangeDomainPoleErrors",
"tags": [
"correctness",
"external/misra/c/2012/third-edition-first-revision"
],
"implementation_scope": {
"description": "This query identifies possible domain, pole and range errors on a selection of C standard library fuctions from math.h."
}
},
{
"description": "Trigonometric periodic functions have significantly less precision when called with large floating-point values.",
"kind": "problem",
"name": "The validity of values passed to trigonometric functions shall be checked",
"precision": "high",
"severity": "warning",
"short_name": "LowPrecisionPeriodicTrigonometricFunctionCall",
"tags": [
"correctness",
"external/misra/c/2012/third-edition-first-revision",
"external/misra/c/2012/amendment3"
]
}
],
"title": "The validity of values passed to library functions shall be checked"
},
"DIR-4-7": {
"properties": {
"obligation": "required"
},
"queries": [
{
"description": "A function (whether it is part of the standard library, a third party library or a user defined function) may provide some means of indicating the occurrence of an error. This may be via a global error flag, a parametric error flag, a special return value or some other means. Whenever such a mechanism is provided by a function the calling program shall check for the indication of an error as soon as the function returns.",
"kind": "problem",
"name": "If a function generates error information, then that error information shall be tested",
"precision": "very-high",
"severity": "recommendation",
"short_name": "FunctionErrorInformationUntested",
"shared_implementation_short_name": "FunctionErroneousReturnValueNotTested",
"tags": [
"maintainability",
"external/misra/c/2012/third-edition-first-revision"
],
"implementation_scope": {
"description": "This query enforces checking on some C standard library functions that may return error codes."
}
}
],
"title": "If a function returns error information, then that error information shall be tested"
}
}
}