SonarQube Standalone Integration

  • This documentation concern the full C/C++ SonarQube integration. In this case no need to install any SonarQube C++ plugin to parse your source code.
    However, it's highly recommended to use the CppDepend plugin side by side with the C++ community plugin. For that you can refer to this documentation .
  • To run CppDepend on a machine you need first to activate your licensing or your evaluation period.
    To do so, once CppDepend files unzipped on the machine, just run once VisualCppDepend.exe. You'll go through a few seconds activation procedure if the machine is connected to internet.
    If the machine is not connected to internet, an offline activation procedure will be proposed instead, and must be fulfilled in order to run the SonarQube CppDepend plugin.
  • The CppDepend SonarQube plugin supports SonarQube version 5.6 and higher.

C/C++ Plugin Prerequisites
Plugin installation and configuration

  • Install the plugin:
    Copy the sonar-cxx-plugin-cppdepend-1.0 from $CppDependInstallDir$/SonarPlugin to the $SonarQubeInstallDir$\extensions\plugins directory and restart SonarQube.

  • Configure the CppDepend scanner path(Mandatory):
    The SonarQube scanner is mandatory to parse the source code using the CppDepend parser based on Clang.

  • Configure the CppDepend custom rules(Optional):
    The default CppDepend rules are loaded to the SonarQube rules repository. However, if you need to customize these rules you can define your own custom rules using the .cdproj file path located under the SonarQube Administration Tab.

  • Create a CppDepend project from VisualCppDepend:
    Create a CppDepend Project as described in our Getting Started page, the goal of this step is to specify the code to analyze and to configure your project analysis, like the technical debt customisation.

  • Launch the analysis:
    >sonar-scanner  -D sonar.cpp.cppdepend.projectPath={the path of cdproj}  

CppDepend offers a wide range of features. It is often described as a Swiss Army Knife for C and C++ developers.

Start Free Trial