Skip to content

Commit 266c553

Browse files
authored
manual-premium.md: how to generate compliance report (danmar#6890)
1 parent c0370c7 commit 266c553

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

man/manual-premium.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1166,6 +1166,37 @@ Command to active Misra C++ 2008 checkers:
11661166

11671167
cppcheck --premium=misra-c++-2008 ....
11681168

1169+
## Compliance report
1170+
1171+
### Graphical user interface
1172+
1173+
Run a analysis with some coding standards enabled. After that you can click on
1174+
the `Compliance report...` in the `File` menu.
1175+
1176+
### Command line
1177+
1178+
There is a tool `compliance-report` that is distributed with Cppcheck Premium. To see
1179+
all available options run `compliance-report` in a terminal with any options.
1180+
1181+
Below is example usage to generate a Misra C 2012 compliance report.
1182+
1183+
1. Execute cppcheck and save warnings in an xml file. Save the checkers report.
1184+
1185+
`cppcheck --premium=misra-c-2012 --checkers-report=r.txt --xml src 2> results.xml`
1186+
1187+
2. Use `compliance-report` to convert the files to an html report.
1188+
1189+
`compliance-report --misra-c-2012 --project-name=Device --project-version=2.3 --checkers-report=r.txt --output-file=report.html results.xml`
1190+
1191+
Description of the options:
1192+
1193+
* `--misra-c-2012`: Generate a compliance report for misra-c-2012
1194+
* `--project-name`: The name of the project
1195+
* `--project-version`: The version of the project
1196+
* `--checkers-report`: Provide the checkers report generated by Cppcheck
1197+
* `--output-file`: html filename that the report should be written to
1198+
* `results.xml`: The xml output from cppcheck
1199+
11691200
## Licenses
11701201

11711202
### Individual license

0 commit comments

Comments
 (0)