Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

premium-manual.md: clarify 'compliance report' and 'Licenses' sections #7043

Merged
merged 2 commits into from
Nov 26, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 13 additions & 19 deletions man/manual-premium.md
Original file line number Diff line number Diff line change
Expand Up @@ -1176,45 +1176,39 @@ 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 --checkers-report=r.txt --xml 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:

* `--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

## Licenses

### Individual license

A license that is connected to your computer. You can check any code you want.

### LOC license
A license that is connected 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.
After installing you run a register tool that will create a license file
which is locked to your computer.

#### Running analysis
### Enterprise license

Commands:
You receive a license file. Copy that to one of these paths:

cd check-path
* Windows:
* C:\\ProgramData\\Cppcheck Solutions AB\\

# Calculate lines of code and validate the license
premiumaddon --check-loc-license some-path/license-file > cppcheck-premium-loc
* Linux:
* /etc/cppcheckpremium/
* ~/.cppcheckpremium/

# Run cppcheck analysis
cppcheck <usual cppcheck parameters>
Loading