Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 53 Next »

Table of Contents

Description / Features

The plugin enables analysis of Groovy projects within Sonar.

It leverages CodeNarc for coding rules violations, Gmetrics for cyclomatic complexity and Cobertura for code coverage.

Plugin

0.1

0.2

0.3

0.4

0.50.6

CodeNarc

0.9

0.9

0.13

0.15

0.16.10.17

GMetrics

0.2

0.2

0.3

0.3

0.40.5

cobertura-maven-plugin

(error)

2.4

2.5

2.5

2.5.12.5.1

Installation

  1. Install the JavaScript plugin through the Update Center or download it into the SONAR_HOME/extensions/plugins directory
  2. Restart the Sonar server

Usage

A list of sample projects is available on github that can be browsed or downloaded:

  1. Groovy project analyzed with the Sonar Runner: /projects/languages/groovy/groovy-sonar-runner
  2. Groovy project analyzed with Maven: /projects/languages/groovy/groovy-maven

Sonar Runner

Create a sonar-project.properties file to configure your analysis with the Sonar Runner.

Here is an example of sonar-project.properties file.

Maven

If you project is built with Maven, you need to add the 'sourceDirectory' property to the build section of your pom:

and the sonar.language property to the properties section of your pom:

Here is an example of pom.xml file.

Advanced Usage

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

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.

Change Log

Loading

Release 0.6 (8 issues)

 

Loading

Release 0.5 (3 issues)

 

Loading

Release 0.4 (3 issues)

 

Loading

Release 0.3 (11 issues)

 

Loading

Release 0.2 (5 issues)

 

Loading

Release 0.1 (4 issues)

  • No labels