Search code examples
jenkinsgrailsgroovysonarqubecodenarc

Where should I define properties in sonar-groovy?


I went through the https://github.com/pmayweg/sonar-groovy

In README.md it specified few properties need to mention, but I am not able to identify where and in which file I have to mention them.

Actual information defined in pmayweg/sonar-groovy/README.md:

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

Groovy File Suffixes It is possible to define multiple groovy file suffixes to be recognized by setting the sonar.groovy.file.suffixes property. Note that by default, only files having .groovythe as extension will be analyzed.

Unit Tests Execution Reports Import unit tests execution reports (JUnit XML format) by setting the sonar.junit.reportsPath property. Default location is target/surefire-reports.

JaCoCo and Binaries The groovy plugin requires access to source binaries when analyzing JaCoCo reports. Consequently, property sonar.groovy.binaries has to be configured for the analysis (comma-separated paths to binary folders). For Maven and gradle projects, the property is automatically set.


Solution

  • Finally, I find out

    sonar-scanner.properties in sonar-scanner/conf or
    sonar-project.properties in your project.