ARCAD CodeChecker 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.
The plug-in interfaces ARCAD CodeChecker with SonarQube. The role of the plug-in is as follows:
- At Sonar server start, the plug-in loads all the rules in a Quality Profile named CodeChecker, and there is one Quality Profile per programming language. Each rule has a definition that includes the rule's information and its documentation.
- When results are sent from ARCAD CodeChecker to SonarQube, the plug-in reads the JSON report generated by ARCAD CodeChecker. This file contains the list of issues found during a campaign. The issues are then loaded in SonarQube.
The Sonar Scanner's role is to send the campaigns results from ARCAD CodeChecker to SonarQube. The scanner is installed and managed via the CodeChecker Server in the Preferences of the CodeChecker Studio.
For more information about the installation instruction for the plug-in and the Sonar Scanner, refer to Installing the ARCAD CodeChecker solution for SonarQube.
For more information about the connection between ARCAD CodeChecker and SonarQube, refer to the Sonar Integration preferences.
The results can be automatically uploaded from ARCAD CodeChecker to SonarQube via Targets.
To make the upload of results possible, enable the Upload to SonarQube option in the Target Definition section of the Target editor.
The Upload to SonarQube option is automatically disabled if no preferences are set for SonarQube.
Targets for which the upload of results is enabled display the SonarQube icon in the Targets list.
The upload of results is performed at the end of each campaign execution for a target on which the Upload to SonarQube option has been enabled.
You can access results in SonarQube directly from the Targets search view in the CodeChecker Studio.
To do so, right-click on a target and click on the Open issues in SonarQube option.
You can also click the SonarQube icon corresponding to the target.
To access results from a target, the Upload to SonarQube option has to be enabled in the Target Definition section of the target options.
You can access results in SonarQube directly from the Campaign Definition section of the Campaign results view in the CodeChecker Studio.
To do so, go to the Campaigns search view and either double-click on a campaign or right-click on a campaign and select Open Campaign Results to open the Campaign results view, then click on the Open issues in SonarQube option.
To access results from the Campaign results, the Upload to SonarQube option has to be enabled in the Target Definition section of the target options.