I am using Sonar in my Grails project. My configuration is in a sonar-project.properties file:
sonar.projectKey=com.mastercard.labs.cplatform
sonar.projectName=Commerce Platform
sonar.projectVersion=1.0
sonar.sources=src/groovy,grails-app/services,grails-app/domain
sonar.language=grvy
sonar.sourceEncoding=UTF-8
I want to adjust the rules for codenarc. I usually do this in my BuildConfig.groovy.
codenarc.properties = {
GrailsPublicControllerMethod.enabled = false
GrailsDomainHasToString.enabled = false
GrailsDomainHasEquals.enabled = false
GrailsStatelessService.addToIgnoreFieldNames = 'grailsApplication'
}
And when I run codenarc locally, it's all cool and puts up the config. But sonar doesn't.
How do I make sonar pick up these rules?
This is not possible @Burt, the only way to tune the rules to be used is by updating your SonarQube quality profile.