Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.
Wiki Markup
Your browser does not support iframes.


The plugin enables analysis of Groovy projects within SonarQube.

It leverages CodeNarc to raise issues against coding rules, Gmetrics for cyclomatic complexity and Cobertura for code coverage.


  1. Prior to the SonarQube analysis, execute your unit tests and generate the Cobertura XML report.
  2. Import this report while running the SonarQube analysis by setting the sonar.groovy.cobertura.reportPath property to the path to the Cobertura XML report. The path may be absolute or relative to the project base directory.

A sample project can be browsed or downloaded: TODObe browsed or downloaded/projects/languages/groovy/groovy-sonar-runner-cobertura.


It is possible to reuse a previously generated report from CodeNarc by setting the sonar.groovy.codenarc.reportPath property.


It is no longer possible to:

  • let Let SonarQube drive the execution of unit tests.
  • import Import unit test execution reports let (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.