Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Here is a quick guide how to generate the reports using external tools

cppcheck

Make sure to pass all include directories as otherwise the analysis will be incomplete. Caveat: cppcheck writes the output to the standard error.

...

Info
titleRule Extensions

Extension of cppcheck rules is possible by using [sonar instal dir]/extensions/rules/cppcheck. See Extending Rules in C++ Analysers on how to create the rules 

Valgrind

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.

...

Info
titleRule Extensions

Extension of valgrind rules is possible by using [sonar instal dir]/extensions/rules/valgrind. See Extending Rules in C++ Analysers on how to create the rules 

Vera++

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. 

...

Info
titleRule Extensions

Extension of vera++ rules is possible by using [sonar instal dir]/extensions/rules/vera++. See Extending Rules in C++ Analysers on how to create the rules

RATS

 

Code Block
rats -w 3 --xml <sources> > report.xml
Info
titleRule Extensions

Extension of rats rules is possible by using [sonar instal dir]/extensions/rules/rats. See Extending Rules in C++ Analysers on how to create the rules


Pc-Lint

Please refer to product page (Official Site)

...