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: "Rule 3.1", 11 reason: "We post HTTP links in code comments which contain // inside comments blocks." 12 }, 13 { 14 deviation: "Rule 14.4", 15 reason: "do while( 0 ) pattern is used in macros to prevent extra semi-colon." 16 }, 17 18 // Disable the following advisory rules and directives. 19 { 20 deviation: "Directive 4.4", 21 reason: "Code snippet is used in comment to help explanation." 22 }, 23 { 24 deviation: "Directive 4.5", 25 reason: "Allow names that MISRA considers ambiguous." 26 }, 27 { 28 deviation: "Directive 4.6", 29 reason: "Allow port to use primitive type with typedefs." 30 }, 31 { 32 deviation: "Directive 4.8", 33 reason: "HeapRegion_t and HeapStats_t are used only in heap files but declared in portable.h which is included in multiple source files. As a result, these definitions appear in multiple source files where they are not used." 34 }, 35 { 36 deviation: "Directive 4.9", 37 reason: "FreeRTOS-Kernel is optimised to work on small micro-controllers. To achieve that, function-like macros are used." 38 }, 39 { 40 deviation: "Rule 2.3", 41 reason: "FreeRTOS defines types which is used in application." 42 }, 43 { 44 deviation: "Rule 2.4", 45 reason: "Allow to define unused tag." 46 }, 47 { 48 deviation: "Rule 2.5", 49 reason: "Allow to define unused macro." 50 }, 51 { 52 deviation: "Rule 5.9", 53 reason: "Allow to define identifier with the same name in structure and global variable." 54 }, 55 { 56 deviation: "Rule 8.7", 57 reason: "API functions are not used by the library outside of the files they are defined; however, they must be externally visible in order to be used by an application." 58 }, 59 { 60 deviation: "Rule 8.9", 61 reason: "Allow to object to be defined in wider scope for debug purpose." 62 }, 63 { 64 deviation: "Rule 8.13", 65 reason: "Allow to not to use const-qualified type for callback function." 66 }, 67 { 68 deviation: "Rule 11.4", 69 reason: "Allow to convert between a pointer to object and an interger type for stack alignment." 70 }, 71 { 72 deviation: "Rule 15.4", 73 reason: "Allow to use multiple break statements in a loop." 74 }, 75 { 76 deviation: "Rule 15.5", 77 reason: "Allow to use multiple points of exit." 78 }, 79 { 80 deviation: "Rule 17.8", 81 reason: "Allow to update the parameters of a function." 82 }, 83 { 84 deviation: "Rule 18.4", 85 reason: "Allow to use pointer arithmetic." 86 }, 87 { 88 deviation: "Rule 19.2", 89 reason: "Allow to use union." 90 }, 91 { 92 deviation: "Rule 20.5", 93 reason: "Allow to use #undef for MPU wrappers." 94 } 95 ] 96} 97 98