From 59da78a0e90008693cf7906f10d573301e888c6d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Tue, 26 Nov 2024 14:36:31 +0100 Subject: [PATCH 1/2] premium-manual.md: clarify 'compliance report' and 'Licenses' sections --- man/manual-premium.md | 24 +++++++++--------------- 1 file changed, 9 insertions(+), 15 deletions(-) diff --git a/man/manual-premium.md b/man/manual-premium.md index de2eadf0af0..1608d0678d7 100644 --- a/man/manual-premium.md +++ b/man/manual-premium.md @@ -1182,11 +1182,11 @@ Below is example usage to generate a Misra C 2012 compliance report. 1. Execute cppcheck and save warnings in an xml file. Save the checkers report. - `cppcheck --premium=misra-c-2012 --checkers-report=r.txt --xml src 2> results.xml` + `cppcheck --premium=misra-c-2012 --xml-version=3 src 2> results.xml` 2. Use `compliance-report` to convert the files to an html report. - `compliance-report --misra-c-2012 --project-name=Device --project-version=2.3 --checkers-report=r.txt --output-file=report.html results.xml` + `compliance-report --misra-c-2012 --project-name=Device --project-version=2.3 --output-file=report.html results.xml` Description of the options: @@ -1201,20 +1201,14 @@ Description of the options: ### Individual license -A license that is connected to your computer. You can check any code you want. +A license that is connected to your computer. -### LOC license +After installing you run a register tool that will create a license file +which is locked to your computer. -A license that allows you to run cppcheck on a limited number of lines of code. It can only be used for certain licensed paths in a repository. +### Enterprise license -#### Running analysis +You receive a license file. Copy that to one of these paths: +Windows: C:\ProgramData\Cppcheck Solutions AB\ +Linux: /etc/cppcheckpremium/ or ~/.cppcheckpremium/ -Commands: - - cd check-path - - # Calculate lines of code and validate the license - premiumaddon --check-loc-license some-path/license-file > cppcheck-premium-loc - - # Run cppcheck analysis - cppcheck From 4a7fdb3476ea1b95f184e0646e848e4a837c4b86 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Tue, 26 Nov 2024 15:10:36 +0100 Subject: [PATCH 2/2] fixes --- man/manual-premium.md | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/man/manual-premium.md b/man/manual-premium.md index 1608d0678d7..f6958950380 100644 --- a/man/manual-premium.md +++ b/man/manual-premium.md @@ -1176,24 +1176,19 @@ the `Compliance report...` in the `File` menu. ### Command line There is a tool `compliance-report` that is distributed with Cppcheck Premium. To see -all available options run `compliance-report` in a terminal with any options. +all available options run `compliance-report` in a terminal with no options. Below is example usage to generate a Misra C 2012 compliance report. -1. Execute cppcheck and save warnings in an xml file. Save the checkers report. +`cppcheck --premium=misra-c-2012 --xml-version=3 src 2> results.xml` - `cppcheck --premium=misra-c-2012 --xml-version=3 src 2> results.xml` - -2. Use `compliance-report` to convert the files to an html report. - - `compliance-report --misra-c-2012 --project-name=Device --project-version=2.3 --output-file=report.html results.xml` +`compliance-report --misra-c-2012 --project-name=Device --project-version=2.3 --output-file=report.html results.xml` Description of the options: * `--misra-c-2012`: Generate a compliance report for misra-c-2012 * `--project-name`: The name of the project * `--project-version`: The version of the project - * `--checkers-report`: Provide the checkers report generated by Cppcheck * `--output-file`: html filename that the report should be written to * `results.xml`: The xml output from cppcheck @@ -1209,6 +1204,11 @@ which is locked to your computer. ### Enterprise license You receive a license file. Copy that to one of these paths: -Windows: C:\ProgramData\Cppcheck Solutions AB\ -Linux: /etc/cppcheckpremium/ or ~/.cppcheckpremium/ + + * Windows: + * C:\\ProgramData\\Cppcheck Solutions AB\\ + + * Linux: + * /etc/cppcheckpremium/ + * ~/.cppcheckpremium/