...
- Install the JavaScript plugin through the Update Center or download it into the SONAR_HOME/extensions/plugins directory
- Restart the Sonar server
Usage
...
Run a Sonar Analysis with the Sonar Runner (Recommended Way)
To launch a Sonar analysis of your Groovy project, use the Sonar Runner.
A sample project is available on github that can be browsed or downloaded:
...
/projects/languages/groovy/groovy-sonar-runner
...
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:
| Code Block |
|---|
<sourceDirectory>src/main/groovy</sourceDirectory> |
and the sonar.language property to the properties section of your pom:
| Code Block |
|---|
<sonar.language>grvy</sonar.language> |
Here is an example of pom.xml file.
.
Run a Sonar Analysis with the other Analyzers
Maven and Ant can also be used to launch analysis on Groovy projects.
A Maven sample project is available on github that can be browsed or downloaded: /projects/languages/groovy/groovy-maven.
Advanced Usage
It is possible to reuse previously generated report from CodeNarc by setting the sonar.groovy.codenarc.reportPath property.
...

