misra.config 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. // MISRA C-2012 Rules
  2. {
  3. version : "2.0",
  4. standard : "c2012",
  5. title: "Coverity MISRA Configuration",
  6. deviations : [
  7. // Disable the following rules.
  8. {
  9. deviation: "Directive 4.8",
  10. reason: "Allow inclusion of unused types. Header files for a specific port, which are needed by all files, may define types that are not used by a specific file."
  11. },
  12. {
  13. deviation: "Directive 4.9",
  14. reason: "Allow inclusion of function like macros. Logging is done using function like macros."
  15. },
  16. {
  17. deviation: "Rule 2.3",
  18. reason: "Allow unused types. Library headers may define types intended for the application's use, but not used within the library files."
  19. },
  20. {
  21. deviation: "Rule 2.4",
  22. reason: "Allow unused tags. Some compilers warn if types are not tagged."
  23. },
  24. {
  25. deviation: "Rule 2.5",
  26. reason: "Allow unused macros. Library headers may define macros intended for the application's use, but not used by a specific file."
  27. },
  28. {
  29. deviation: "Rule 3.1",
  30. reason: "Allow nested comments. Documentation blocks contain comments for example code."
  31. },
  32. {
  33. deviation: "Rule 8.7",
  34. 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."
  35. },
  36. {
  37. deviation: "Rule 11.5",
  38. reason: "Allow casts from `void *`. The payload buffers are stored as `void *` and are cast to various types for use in functions."
  39. },
  40. ]
  41. }