Skip to content

Commit

Permalink
Manual: clarify misra coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
danmar committed Sep 13, 2023
1 parent 844ed2b commit 8176bb6
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions man/manual.md
Original file line number Diff line number Diff line change
Expand Up @@ -877,10 +877,22 @@ Cppcheck is distributed with a few addons which are listed below.

[misra.py](https://github.com/danmar/cppcheck/blob/main/addons/misra.py) is used to verify compliance with MISRA C 2012, a proprietary set of guidelines to avoid questionable code, developed for embedded systems.

#### Open source Cppcheck

This standard is proprietary, and open source tools are not allowed to distribute the Misra rule texts. Therefore Cppcheck is not allowed to write the rule texts directly. Cppcheck is allowed to distribute the rules and display the id of each violated rule (for example, [c2012-21.3]). The corresponding rule text can also be written however you need to provide that. To get the rule texts, please buy the PDF from MISRA (https://www.misra.org.uk). If you copy the rule texts from "Appendix A - Summary of guidelines" in the PDF and write those in a text file, then by using that text file Cppcheck can write the proper warning messages. To see how the text file can be formatted, take a look at the files listed here: https://github.com/danmar/cppcheck/blob/main/addons/test/misra/. You can use the option `--rule-texts` to specify your rules text file.

Misra C amendment 1 and 2 are included.

The full list of supported rules is available on [Cppcheck](https://cppcheck.sourceforge.io/misra.php) home page.

#### Cppcheck Premium

The misra rule texts are provided.

Misra C amendment 1,2,3,4 are included.

Misra C 2023 can be checked if --premium=misra-c-2023 option is used.

### y2038.py

[y2038.py](https://github.com/danmar/cppcheck/blob/main/addons/y2038.py) checks Linux systems for [year 2038 problem](https://en.wikipedia.org/wiki/Year_2038_problem) safety. This required [modified environment](https://github.com/3adev/y2038). See complete description [here](https://github.com/danmar/cppcheck/blob/main/addons/doc/y2038.txt).
Expand Down

0 comments on commit 8176bb6

Please sign in to comment.