This an an archived version of the documentation for SonarQube version 4.5 & 4.5.x LTS.
See https://docs.sonarqube.org/display/SONAR/Documentation for current functionality
Your browser does not support iframes.
If you want to see a live example of the capabilities of the Groovy plugin, you can have a look at the analysis of the CodeNarc project on Nemo.
Description / Features
The plugin enables analysis of Groovy within SonarQube.
- Install the plugin through the Update Center or download it into the SONARQUBE_HOME/extensions/plugins directory
- Restart the SonarQube server
Run an Analysis with the SonarQube Runner (Recommended method)
To run an analysis of your Groovy project, use the SonarQube Runner.
Run an Analysis with the other Analyzers
To display code coverage data:
- Prior to the SonarQube analysis, execute your unit tests and generate the Cobertura XML report.
- Import this report while running the SonarQube analysis by setting the
sonar.groovy.cobertura.reportPathproperty to the path to the Cobertura XML report. The path may be absolute or relative to the project base directory.
It is possible to reuse a previously generated report from CodeNarc by setting the
It is no longer possible to:
- Let SonarQube drive the execution of unit tests.
- Import unit test execution reports (feel free to vote for to reintroduce this feature).
- Let SonarQube drive the execution of Cobertura; it is now only possible to import previously generated Cobertura report.