Installing the ARCAD CodeChecker solution for SonarQube
The ARCAD CodeChecker solution for SonarQube integrates the results of code quality campaign in SonarQube, the open-source platform for continuous inspection of code quality. You can review issues raised in a campaign with the functionalities offered by the Sonar interface (code review, statistics, etc.). Like in the CodeChecker Studio, rule documentation is available for each issue in Sonar.
The solution is composed of:
- The ARCAD CodeChecker plug-in for SonarQube, to be installed on the SonarQube server. The plug-in is a SonarQube add-on that allows you to manage your source code quality with SonarQube.
- The Sonar Scanner, supplied by Sonar and fully managed on the CodeChecker Server side. The scanner is a Sonar component that ensures the communication of the CodeChecker Server with SonarQube.
For more information about the ARCAD CodeChecker solution for SonarQube, refer to ARCAD CodeChecker for SonarQube.
- ARCAD CodeChecker version 22.0 or above.
- The latest version of SonarQube must be installed, preferably the LTS distribution.
To get the latest version of SonarQube, go to the SonarQube download page.
Refer to the prerequisites for SonarQube and the installation procedure.
The installation materials is composed of a Java archive for the ARCAD CodeChecker plug-in for SonarQube.
Before installing the plug-in, make sure that the SonarQube server is stopped.
Step 1 To install the plug-in in SonarQube, copy the sonar-codechecker-plugin-24.0.jar file to the extensions/plugins folder located in the SonarQube installation directory.
Step 2 Restart the servers. The CodeChecker Server must be started before starting the SonarQube Server.
Result The ARCAD CodeChecker plug-in for SonarQube is installed and available for use.
To uninstall the plug-ins, remove the .jar file from the sonarqube-x.x.x/extensions/plugins folder located in the SonarQube installation directory, then restart SonarQube.
For more information about installing plug-ins for SonarQube, refer to the SonarQube documentation.
Prerequisites
This installation makes it possible to install the Sonar Scanner directly from ARCAD CodeChecker.
This installation being fully automated, the CodeChecker Server must be able to call the SonarQube Scanner update site through a HTTP request first.
The Sonar Scanner website contains all the available versions.
Once the prerequisites are set, follow the subsequent steps to install the SonarQube Scanner:
Step 1 Right-click on the ARCAD CodeChecker Server in the navigation bar of the CodeChecker Studio.
Step 2 Click on Preferences to open the Preferences menu.
Step 3 Open the Sonar Integration settings page.
Step 4 Click Update to install the Sonar Scanner.
Result The most recent version of the Sonar Scanner is now installed in ARCAD CodeChecker. A dialog opens to confirm the installation is successful and the current version number is displayed.
To update the Sonar Scanner when a new version is released, click the Update button in the Sonar integration preferences settings page.
If the latest version is already installed, a warning dialog opens to let you know that the Sonar Scanner cannot be updated, as it is already installed in its latest version.
If Sonar Scanner cannot be installed automatically through ARCAD CodeChecker, it is possible to install it manually.
To do so:
Step 1 Go to the Sonar Scanner website.
Step 2 Download the zip distribution named Any (requires a pre-installed JVM).
Step 3 Move the zip file to the ARCAD Solutions\ARCAD-CodeChecker Server\sonarscanner directory.
Step 4 Restart the CodeChecker Server from the Windows Services.
Result The most recent version of the Sonar Scanner is installed in ARCAD CodeChecker. Open the Sonar integration preferences menu to make sure the latest version is installed.
The manual installation replaces any Sonar Scanner version installed, even if the installed version is more recent.
To uninstall the Sonar Scanner from ARCAD CodeChecker, clear the ARCAD Solutions\ARCAD-CodeChecker Server\sonarscanner directory.