xref: /CoreMQTT-Agent-v1.2.0/tools/coverity/misra.config (revision 541402274fc6bf52f35e14f39c0c1dd2f9205ad3)
1// MISRA C-2012 Rules
2
3{
4    version : "2.0",
5    standard : "c2012",
6    title: "Coverity MISRA Configuration",
7    deviations : [
8        // Disable the following rules.
9        {
10            deviation: "Directive 4.5",
11            reason: "Allow names that MISRA considers ambiguous."
12        },
13        {
14            deviation: "Directive 4.8",
15            reason: "Allow inclusion of unused types. Header files for coreMQTT, which are needed by all files, define types that are not used by the agent."
16        },
17        {
18            deviation: "Directive 4.9",
19            reason: "Allow inclusion of function like macros. Asserts and logging are done using function like macros."
20        },
21        {
22            deviation: "Rule 2.3",
23            reason: "Allow unused types. coreMQTT Library headers define types intended for the application's use, but are not used by the agent files."
24        },
25        {
26            deviation: "Rule 2.4",
27            reason: "Allow unused tags. Some compilers warn if types are not tagged."
28        },
29        {
30            deviation: "Rule 2.5",
31            reason: "Allow unused macros. coreMQTT Library headers define macros intended for the application's use, but are not used by the agent."
32        },
33        {
34            deviation: "Rule 3.1",
35            reason: "Allow nested comments. Documentation blocks contain comments for example code."
36        },
37        {
38            deviation: "Rule 11.5",
39            reason: "Allow casts from void *. Contexts are passed as void * and must be cast to the correct data type before use."
40        }
41    ]
42}
43