Version Information
Plugin | 0.1 | 0.2 | 0.3 | 0.4 | 0.5 |
|---|---|---|---|---|---|
CodeNarc | 0.9 | 0.9 | 0.13 | 0.15 | 0.16.1 |
GMetrics | 0.2 | 0.2 | 0.3 | 0.3 | 0.4 |
cobertura-maven-plugin |
| 2.4 | 2.5 | 2.5 | 2.5.1 |
Description / Features
This plugin enables the analysis of Groovy projects. To do so, it leverages CodeNarc for coding rules violations, Gmetrics for cyclomatic complexity and Cobertura for code coverage.
Installation
Place the JAR file of the plugin in /extensions/plugins of your Sonar installation. Restart sonar.
Usage
Maven projects
If you project is built with Maven, you should add in your pom
to the build section and :
Non-maven projects
If you project does not use Maven as a build engine, you should create a small pom.xml file at the root of you project and have the following content in it :
Running analysis
To kick-off the analysis, run mvn sonar:sonar
Advanced usage
It is possible to reuse some reports already existing for GMetrics and CodeNarc. To do so, use sonar.groovy.gmetrics.reportPath or sonar.groovy.codenarc.reportPath.
Known limitations
- The source directory must be added to the pom.xml, even if the project is built with Maven. This comes from the fact that Sonar does not call gmaven plugin.
- Inner classes are not processed in the current version and will therefore not be reported. See SONARPLUGINS-597.
Changelog
| Release 0.6 (8 issues) | |||||
|---|---|---|---|---|---|
| Type | Key | Summary | Priority | Status | Resolution |
|
|
SONARPLUGINS-2110 | Do not execute CodeNarc, if no active rules |
|
|
Fixed |
|
|
SONARPLUGINS-2108 | Groovy Plugin not compatible with SCM Activity Plugin |
|
|
Fixed |
|
|
SONARPLUGINS-2107 | Rename default quality profile to "Sonar way" to be consistent with other plugins |
|
|
Fixed |
|
|
SONARPLUGINS-1745 | Update to CodeNarc 0.17 and GMetrics 0.5 |
|
|
Fixed |
|
|
SONARPLUGINS-1707 | On Groovy projects, replace the "distribution of complexity by class" by the "distribution of complexity by file" |
|
|
Fixed |
|
|
SONARPLUGINS-1631 | Refactor the way how Groovy plugin handles resources |
|
|
Fixed |
|
|
SONARPLUGINS-1123 | Parsing GMetrics Report - Inner Classes leads to Exception and Termination of build |
|
|
Fixed |
|
|
SONARPLUGINS-597 | Inner classes are not properly handled by the plugin in GMetrics results parsing |
|
|
Fixed |
| Release 0.5 (3 issues) | |||||
|---|---|---|---|---|---|
| Type | Key | Summary | Priority | Status | Resolution |
|
|
SONARPLUGINS-1565 | Update to CodeNarc 0.16.1 and GMetrics 0.4 |
|
|
Fixed |
|
|
SONARPLUGINS-1404 | Update to cobertura-maven-plugin 2.5.1 |
|
|
Fixed |
|
|
SONARPLUGINS-596 | Error when parsing certain files for duplications |
|
|
Fixed |
| Release 0.4 (3 issues) | |||||
|---|---|---|---|---|---|
| Type | Key | Summary | Priority | Status | Resolution |
|
|
SONARPLUGINS-1359 | Update to CodeNarc 0.15 |
|
|
Fixed |
|
|
SONARPLUGINS-1205 | Update to CodeNarc 0.14 |
|
|
Fixed |
|
|
SONARPLUGINS-1159 | Some rule parameters were missed |
|
|
Fixed |
| Release 0.3 (11 issues) | |||||
|---|---|---|---|---|---|
| Type | Key | Summary | Priority | Status | Resolution |
|
|
SONARPLUGINS-1137 | Allow to import CodeNarc ruleset |
|
|
Fixed |
|
|
SONARPLUGINS-1108 | Update to cobertura-maven-plugin 2.5 |
|
|
Fixed |
|
|
SONARPLUGINS-1107 | No messages in violations |
|
|
Fixed |
|
|
SONARPLUGINS-1106 | Update to CodeNarc 0.13 |
|
|
Fixed |
|
|
SONARPLUGINS-872 | Groovy Plugin: Report path for sonar.groovy.codenarc.reportPath property is not read correctly |
|
|
Fixed |
|
|
SONARPLUGINS-871 | Groovy Plugin: Report path for sonar.groovy.gmetrics.reportPath property is not read correctly |
|
|
Fixed |
|
|
SONARPLUGINS-754 | Migrate to new rules api |
|
|
Fixed |
|
|
SONARPLUGINS-742 | Use cobertura parser provided by sonar-cobertura-plugin and surefire parser provided by sonar-surefire-plugin |
|
|
Fixed |
|
|
SONARPLUGINS-697 | Upgrade to CodeNarc 0.12 and GMetrics 0.3 |
|
|
Fixed |
|
|
SONARPLUGINS-621 | Add rules parameters |
|
|
Fixed |
|
|
SONARPLUGINS-620 | Cannot parse lineNumber "" |
|
|
Fixed |
| Release 0.2 (5 issues) | |||||
|---|---|---|---|---|---|
| Type | Key | Summary | Priority | Status | Resolution |
|
|
SONARPLUGINS-696 | NPE in CoberturaSensor, when parsing some reports |
|
|
Fixed |
|
|
SONARPLUGINS-692 | Report results of unit tests |
|
|
Fixed |
|
|
SONARPLUGINS-687 | Test files incorrectly handled by GroovySourceImporter |
|
|
Fixed |
|
|
SONARPLUGINS-672 | Migrate to sonar-dev-maven-plugin from sonar-dev-mojo for integration tests |
|
|
Fixed |
|
|
SONARPLUGINS-613 | Add coverage using Cobertura |
|
|
Fixed |
| Release 0.1 (4 issues) | |||||
|---|---|---|---|---|---|
| Type | Key | Summary | Priority | Status | Resolution |
|
|
SONARPLUGINS-582 | Integrate Gmetrics for standard metrics |
|
|
Fixed |
|
|
SONARPLUGINS-581 | Integrate CodeNarc coding rules engine |
|
|
Fixed |
|
|
SONARPLUGINS-580 | Create Groovy Plugin |
|
|
Fixed |
|
|
SONARPLUGINS-194 | Provide rules for groovy/grails with codenarc in sonar |
|
|
Fixed |

