File tree Expand file tree Collapse file tree 4 files changed +18
-13
lines changed Expand file tree Collapse file tree 4 files changed +18
-13
lines changed Original file line number Diff line number Diff line change 2
2
3
3
The backoffAlgorithm library files conform to the [ MISRA C:2012] ( https://www.misra.org.uk )
4
4
guidelines, with some noted exceptions. Compliance is checked with Coverity static analysis.
5
- Deviations from the MISRA standard are listed below:
5
+ The specific deviations, suppressed inline, are listed below.
6
6
7
- ### Ignored by [ Coverity Configuration] ( tools/coverity/misra.config )
8
- | Deviation | Category | Justification |
9
- | :-: | :-: | :-: |
10
- | Directive 4.9 | Advisory | Allow inclusion of function like macros. |
11
- | Rule 3.1 | Required | Allow nested comments. C++ style ` // ` comments are used in example code within Doxygen documentation blocks. |
12
- | Rule 2.4 | Advisory | Allow unused tags. Some compilers warn if types are not tagged. |
7
+ Additionally, [ MISRA configuration file] ( https://github.com/FreeRTOS/backoffAlgorithm/blob/main/tools/coverity/misra.config ) contains the project wide deviations.
13
8
14
- ### Flagged by Coverity
15
- | Deviation | Category | Justification |
16
- | :-: | :-: | :-: |
17
- | Rule 8.7 | Advisory | API functions are not used by the library; however, they must be externally visible in order to be used by an application. |
18
9
10
+ ### Suppressed with Coverity Comments
11
+ To find the violation references in the source files run grep on the source code
12
+ with ( Assuming rule 11.4 violation; with justification in point 2 ):
13
+ ```
14
+ grep 'MISRA Ref 11.4.2' . -rI
15
+ ```
16
+ * None.*
Original file line number Diff line number Diff line change @@ -22,6 +22,7 @@ getaddrinfo
22
22
github
23
23
html
24
24
https
25
+ ifdef
25
26
ifndef
26
27
inc
27
28
ingroup
@@ -60,4 +61,3 @@ toolchain
60
61
tr
61
62
trng
62
63
usleep
63
- utils
Original file line number Diff line number Diff line change @@ -45,6 +45,9 @@ target_include_directories( coverity_analysis
45
45
PUBLIC
46
46
${BACKOFF_ALGORITHM_INCLUDE_PUBLIC_DIRS} )
47
47
48
+ # Disable logging/assert() calls when building the Coverity analysis target
49
+ target_compile_options (coverity_analysis PUBLIC -DNDEBUG )
50
+
48
51
# ==================================== Unit Test Configuration ====================================
49
52
50
53
if (${BUILD_CODE_EXAMPLE} )
Original file line number Diff line number Diff line change 17
17
{
18
18
deviation: "Rule 3.1",
19
19
reason: "Allow nested comments. Documentation blocks contain comments for example code."
20
- }
20
+ },
21
+ {
22
+ deviation: "Rule 8.7",
23
+ reason: "API functions are not used by library. They must be externally visible in order to be used by the application."
24
+ },
21
25
]
22
26
}
You can’t perform that action at this time.
0 commit comments