MISRA Compliance π
MISRA C is a widely accepted model for best practices used by automotive, telecom, aerospace, medical, and other critical industries. The Judo scanner honors all Mandatory, Required, and Advisory rules defined by MISRA C:2012 and its amendments. The Judo parser honors all Mandatory, Required, and most Advisory rules defined by MISRA C:2012 and its amendments.
Conformance to most MISRA rules is verified with static analysis tools. If you believe there is a MISRA violation and/or an inaccuracy in the compliance table, then please report it here.
Compliance Summary Table π
If Judo is compliant with a directive or rule then the Compliance column will begin with the text βCompliantβ optionally followed by the verification method in parentheses. If no verification method is listed, then static analysis is assumed (this is how most rules are verified). If Judo is non-compliant with a directive or rule then the Compliance column will begin with the text βNon-compliantβ in bold followed by documentation explaining why.
The MISRA C:2012 rule texts cannot be freely distributed therefore the compliance summary table lists the rule number, but omits the description. It is assumed the reader has access to the MISRA C:2012 standard and can cross-reference the rule numbers with the standard.
Click here to view a tool-generated MISRA compliance summary table.
Implementation π
Directive
|
Category
|
Compliance
|
D1.1
|
Required
|
Compliant (manually verified)
|
Compilation and Build π
Directive
|
Category
|
Compliance
|
D2.1
|
Required
|
Compliant (verified with GCC, Clang, and MSVC)
|
Requirements Traceability π
Directive
|
Category
|
Compliance
|
D3.1
|
Required
|
Compliant (manually verified)
|
Code Design π
Directive
|
Category
|
Compliance
|
D4.1
|
Required
|
Compliant (manually verified)
|
D4.2
|
Advisory
|
Compliant (manually verified)
|
D4.3
|
Required
|
Compliant
|
D4.4
|
Advisory
|
Compliant
|
D4.5
|
Advisory
|
Compliant
|
D4.6
|
Advisory
|
Compliant [1]
|
D4.7
|
Required
|
Compliant (manually verified)
|
D4.8
|
Advisory
|
Compliant (manually verified)
|
D4.9
|
Advisory
|
Compliant
|
D4.10
|
Required
|
Compliant (manually verified)
|
D4.11
|
Required
|
Compliant (verified by unit tests)
|
D4.12
|
Required
|
Compliant (manually verified)
|
D4.13
|
Advisory
|
Compliant (manually verified)
|
[1] Whether this is a violation or not depends on how your math.h
defines NAN
and INFINITY
and how your MISRA tool understands them.
Standard C Environment π
Rule
|
Category
|
Compliance
|
1.1
|
Required
|
Compliant
|
1.2
|
Advisory
|
Compliant (verified by compiling with Clangβs -pedantic flag)
|
1.3
|
Required
|
Compliant (verified by Clangβs undefined behavior sanitizer) [1]
|
1.4
|
Required
|
Compliant
|
1.5
|
Required
|
Compliant
|
[1] Your MISRA tool may report multiple function calls within logical OR conditional as exhibiting side effects. These are false positives as the functions in question do not have side effects.
Unused Code π
Rule
|
Category
|
Compliance
|
2.1
|
Required
|
Compliant
|
2.2
|
Required
|
Compliant
|
2.3
|
Advisory
|
Compliant
|
2.4
|
Advisory
|
Compliant
|
2.5
|
Advisory
|
Compliant
|
2.6
|
Advisory
|
Compliant
|
2.7
|
Advisory
|
Compliant
|
2.8
|
Advisory
|
Compliant
|
Comments π
Rule
|
Category
|
Compliance
|
3.1
|
Required
|
Compliant
|
3.2
|
Required
|
Compliant
|
Character Sets and Lexical Conventions π
Rule
|
Category
|
Compliance
|
4.1
|
Required
|
Compliant
|
4.2
|
Advisory
|
Compliant
|
Identifiers π
Rule
|
Category
|
Compliance
|
5.1
|
Required
|
Compliant
|
5.2
|
Required
|
Compliant
|
5.3
|
Required
|
Compliant
|
5.4
|
Required
|
Compliant
|
5.5
|
Required
|
Compliant
|
5.6
|
Required
|
Compliant
|
5.7
|
Required
|
Compliant
|
5.8
|
Required
|
Compliant
|
5.9
|
Advisory
|
Compliant
|
Rule
|
Category
|
Compliance
|
6.1
|
Required
|
Compliant
|
6.2
|
Required
|
Compliant
|
6.3
|
Required
|
Compliant
|
Literals and Constants π
Rule
|
Category
|
Compliance
|
7.1
|
Required
|
Compliant
|
7.2
|
Required
|
Compliant
|
7.3
|
Required
|
Compliant
|
7.4
|
Required
|
Compliant
|
7.5
|
Mandatory
|
Compliant
|
7.6
|
Required
|
Compliant
|
Declarations and Definitions π
Rule
|
Category
|
Compliance
|
8.1
|
Required
|
Compliant
|
8.2
|
Required
|
Compliant
|
8.3
|
Required
|
Compliant
|
8.4
|
Required
|
Compliant
|
8.5
|
Required
|
Compliant
|
8.6
|
Required
|
Compliant
|
8.7
|
Advisory
|
Compliant [1]
|
8.8
|
Required
|
Compliant
|
8.9
|
Advisory
|
Compliant
|
8.10
|
Required
|
Compliant
|
8.11
|
Advisory
|
Compliant
|
8.12
|
Required
|
Compliant
|
8.13
|
Advisory
|
Compliant
|
8.14
|
Required
|
Compliant
|
8.15
|
Required
|
Compliant
|
8.16
|
Advisory
|
Compliant
|
8.17
|
Advisory
|
Compliant
|
[1] Your MISRA tool may return a violation for the public API functions because Judo defines them, but does not use them (they are for consumers of the library).
Initialization π
Rule
|
Category
|
Compliance
|
9.1
|
Mandatory
|
Compliant
|
9.2
|
Required
|
Compliant
|
9.3
|
Required
|
Compliant
|
9.4
|
Required
|
Compliant
|
9.5
|
Required
|
Compliant
|
9.6
|
Required
|
Compliant
|
9.7
|
Mandatory
|
Compliant
|
The Essential Type Modal π
Rule
|
Category
|
Compliance
|
10.1
|
Required
|
Compliant
|
10.2
|
Required
|
Compliant
|
10.3
|
Required
|
Compliant
|
10.4
|
Required
|
Compliant
|
10.5
|
Advisory
|
Compliant
|
10.6
|
Required
|
Compliant
|
10.7
|
Required
|
Compliant
|
10.8
|
Required
|
Compliant
|
Pointer Type Conversion π
Rule
|
Category
|
Compliance
|
11.1
|
Required
|
Compliant
|
11.2
|
Required
|
Compliant
|
11.3
|
Required
|
Compliant
|
11.4
|
Advisory
|
Compliant
|
11.5
|
Advisory
|
Non-compliant [1]
|
11.6
|
Required
|
Compliant
|
11.7
|
Required
|
Compliant
|
11.8
|
Required
|
Compliant
|
11.9
|
Required
|
Compliant
|
11.10
|
Required
|
Compliant
|
[1] The parsers memory allocation interface returns a void pointer which must be cast to the appropriate type. The scanner is compliant with this rule.
Expressions π
Rule
|
Category
|
Compliance
|
12.1
|
Advisory
|
Compliant
|
12.2
|
Required
|
Compliant
|
12.3
|
Advisory
|
Compliant
|
12.4
|
Advisory
|
Compliant
|
12.5
|
Mandatory
|
Compliant
|
12.6
|
Required
|
Compliant
|
Side Effects π
Rule
|
Category
|
Compliance
|
13.1
|
Required
|
Compliant
|
13.2
|
Required
|
Compliant
|
13.3
|
Advisory
|
Compliant
|
13.4
|
Advisory
|
Compliant
|
13.5
|
Required
|
Compliant
|
13.6
|
Mandatory
|
Compliant
|
Control Statement Expressions π
Rule
|
Category
|
Compliance
|
14.1
|
Required
|
Compliant
|
14.2
|
Required
|
Compliant
|
14.3
|
Required
|
Compliant
|
14.4
|
Required
|
Compliant
|
Control Flow π
Rule
|
Category
|
Compliance
|
15.1
|
Advisory
|
Compliant
|
15.2
|
Required
|
Compliant
|
15.3
|
Required
|
Compliant
|
15.4
|
Advisory
|
Compliant
|
15.5
|
Advisory
|
Compliant
|
15.6
|
Required
|
Compliant
|
15.7
|
Required
|
Compliant
|
Switch Statements π
Rule
|
Category
|
Compliance
|
16.1
|
Required
|
Compliant
|
16.2
|
Required
|
Compliant
|
16.3
|
Required
|
Compliant
|
16.4
|
Required
|
Compliant
|
16.5
|
Required
|
Compliant
|
16.6
|
Required
|
Compliant
|
16.7
|
Required
|
Compliant
|
Functions π
Rule
|
Category
|
Compliance
|
17.1
|
Required
|
Compliant
|
17.2
|
Required
|
Compliant
|
17.3
|
Mandatory
|
Compliant
|
17.4
|
Mandatory
|
Compliant
|
17.5
|
Advisory
|
Compliant
|
17.6
|
Mandatory
|
Compliant
|
17.7
|
Required
|
Compliant
|
17.8
|
Advisory
|
Compliant
|
17.9
|
Mandatory
|
Compliant
|
17.10
|
Required
|
Compliant
|
17.11
|
Advisory
|
Compliant
|
17.12
|
Advisory
|
Compliant
|
17.13
|
Required
|
Compliant
|
Pointers and Arrays π
Rule
|
Category
|
Compliance
|
18.1
|
Required
|
Compliant
|
18.2
|
Required
|
Compliant
|
18.3
|
Required
|
Compliant
|
18.4
|
Advisory
|
Compliant
|
18.5
|
Advisory
|
Compliant
|
18.6
|
Required
|
Compliant
|
18.7
|
Required
|
Compliant
|
18.8
|
Required
|
Compliant
|
18.9
|
Required
|
Compliant
|
18.10
|
Mandatory
|
Compliant
|
Overlapping Storage π
Rule
|
Category
|
Compliance
|
19.1
|
Mandatory
|
Compliant
|
19.2
|
Advisory
|
Non-compliant [1]
|
[1] The parser violates this rule by using a union type in its implementation. The usage of the union is isolated to a single translation unit. The scanner is compliant with this rule.
Preprocessing Directives π
Rule
|
Category
|
Compliance
|
20.1
|
Advisory
|
Compliant
|
20.2
|
Required
|
Compliant
|
20.3
|
Required
|
Compliant
|
20.4
|
Required
|
Compliant
|
20.5
|
Advisory
|
Compliant
|
20.6
|
Required
|
Compliant
|
20.7
|
Required
|
Compliant
|
20.8
|
Required
|
Compliant
|
20.9
|
Required
|
Compliant
|
20.10
|
Advisory
|
Compliant
|
20.11
|
Required
|
Compliant
|
20.12
|
Required
|
Compliant
|
20.13
|
Required
|
Compliant
|
20.14
|
Required
|
Compliant
|
Standard Libraries π
Rule
|
Category
|
Compliance
|
21.1
|
Required
|
Compliant
|
21.2
|
Required
|
Compliant
|
21.3
|
Required
|
Compliant
|
21.4
|
Required
|
Compliant
|
21.5
|
Required
|
Compliant
|
21.6
|
Required
|
Compliant
|
21.7
|
Required
|
Compliant
|
21.8
|
Required
|
Compliant
|
21.9
|
Required
|
Compliant
|
21.10
|
Required
|
Compliant
|
21.11
|
Required
|
Compliant
|
21.12
|
Advisory
|
Compliant
|
21.13
|
Mandatory
|
Compliant
|
21.14
|
Required
|
Compliant
|
21.15
|
Required
|
Compliant
|
21.16
|
Required
|
Compliant
|
21.17
|
Required
|
Compliant
|
21.18
|
Mandatory
|
Compliant
|
21.19
|
Mandatory
|
Compliant
|
21.20
|
Mandatory
|
Compliant
|
21.21
|
Required
|
Compliant
|
21.22
|
Mandatory
|
Compliant
|
21.23
|
Required
|
Compliant
|
21.24
|
Required
|
Compliant
|
21.25
|
Required
|
Compliant
|
21.26
|
Required
|
Compliant
|
Resources π
Rule
|
Category
|
Compliance
|
22.1
|
Required
|
Compliant
|
22.2
|
Mandatory
|
Compliant
|
22.3
|
Required
|
Compliant
|
22.4
|
Mandatory
|
Compliant
|
22.5
|
Mandatory
|
Compliant
|
22.6
|
Mandatory
|
Compliant
|
22.7
|
Required
|
Compliant
|
22.8
|
Required
|
Compliant
|
22.9
|
Required
|
Compliant
|
22.10
|
Required
|
Compliant
|
22.11
|
Required
|
Compliant
|
22.12
|
Mandatory
|
Compliant
|
22.13
|
Required
|
Compliant
|
22.14
|
Mandatory
|
Compliant
|
22.15
|
Required
|
Compliant
|
22.16
|
Required
|
Compliant
|
22.17
|
Required
|
Compliant
|
22.18
|
Required
|
Compliant
|
22.19
|
Required
|
Compliant
|
22.20
|
Mandatory
|
Compliant
|
Generic Selections π
Rule
|
Category
|
Compliance
|
23.1
|
Advisory
|
Compliant
|
23.2
|
Required
|
Compliant
|
23.3
|
Advisory
|
Compliant
|
23.4
|
Required
|
Compliant
|
23.5
|
Advisory
|
Compliant
|
23.6
|
Required
|
Compliant
|
23.7
|
Advisory
|
Compliant
|
23.8
|
Required
|
Compliant
|