IntelliJ IDEA - See the IDEA CodeNarc Plugin.
Visual Studio Code - See the VsCode Groovy Lint extension.
See CodeNarc - Docker.
Grails - See the Grails CodeNarc Plugin for Grails 2.x. Use the Gradle CodeNarc Plugin for Grails 3.x and later. Also see Static code analysis in a Grails app with CodeNarc.
Griffon - See the Griffon CodeNarc Plugin
dependencies {
codenarc('org.codenarc:CodeNarc:3.2.0')
codenarc('org.codehaus.groovy:groovy-all:3.0.9')
}
Maven - See the Maven CodeNarc Plugin
Jenkins - The Jenkins Warnings NG Plugin includes reporting and trending of CodeNarc violations.
SonarQube - The Sonar Groovy Plugin uses CodeNarc for its static analysis of Groovy source code.
Grails (and possibly other tools integrating with CodeNarc) can benefit from using the current thread context
ClassLoader
for loading rule script files, rather than the default base ClassLoader
. Setting the
“codenarc.useCurrentThreadContextClassLoader” system property to “true” uses the current thread context
ClassLoader
for loading rule script files. That enables Grails to load rule script files from within
the Grails project, and allows those rule scripts to reference local classes. See
GPCODENARC-32. The
Grails CodeNarc Plugin automatically sets that system property.