Here is a quick guide how to run the supported analyzers and generate reports such that it fits SonarQube's needs.
In order to run cppcheck and generate a fitting report, make sure to:
- to pass all include directories as otherwise the analysis will be incomplete
- that the <sources> parameter matches the sonar.sources list in sonar-project.properties
- create an XML report version 1 using the parameters "
- get the report from the standard error channel
A cppcheck may take a while on a big code base. To cut down analysis times, check the following options:
- Use -j N option to run N workers in parallel
- Use only checks you're interested in via the option
- Restrict checking of preprocessor configurations using
- Get a faster machine
Just tell valgrind to generate XML output. The 'tool' option isn't necessary as 'memcheck' is the default one. Make sure the binaries contain debug info.
The generation of vera++ reports is somewhat more tricky. We find all the files we want to be analysed, pipe this list into vera++ and pipe its output into a Perl script which finally generates the required XML.
The Pc-Lint XML output needs to be formated to fit SonarQube.
This formating has been verifed with Pc-Lint 9.0i.
For further details on how to configure Pc-Lint please refer to product page (Official Site)