Skip to content

SonarQubeCommunity/sonar-cppcheck

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SonarQube Cppcheck Plugin

This plugin can be used to import Cppcheck reports into SonarQube.

The plugin will not run Cppcheck but instead re-use the report generated by it. Here are the steps:

  1. Download and install Cppcheck (version 1.47 or higher) on the machine running the SonarQube analysis
  2. Install this SonarQube Cppcheck plugin (see the release section and the instructions to manually install a SonarQube plugin)
  3. Run Cppcheck to create an xml report:
cppcheck --xml --xml-version=2 --enable=all <source-location> 2> cppcheck-report.xml
  1. Set the sonar.cppcheck.reportPath analysis property to the path of the Cppcheck xml report, e.g.:
sonar.cppcheck.reportPath=cppcheck-report.xml
  1. Activate some Cppcheck rules in your quality profile
  2. Run the SonarQube analysis on your project