The CodeNarc project provides a static analysis tool and framework for analyzing Groovy source code.
CodeNarc scans Groovy source code, looking for violations of predefined or custom rules and generates an HTML or XML report of the results. These rules include checks for coding standards, or searching for unused code, possible bugs or bad coding practices.
You can run CodeNarc using the supplied Ant Task, or run it from the command-line, or as part of your test suite
See the site navigation menu for a list of the rulesets and rules provided out of the box by CodeNarc. Or you can create your own custom ruleset
Take a look at a Sample CodeNarc Report, or example reports from popular Groovy-based open source projects.
CodeNarc was influenced by the wonderful PMD and Checkstyle tools for analyzing Java source code, as well as others.
CodeNarc plugins are available for Grails and Griffon.
CodeNarc is integrated into the Gradle build system, and a Maven plugin is also available.
The CodeNarc project requires:
CodeNarc has been tested with:
For projects built using Maven, CodeNarc is now available from the Maven Central Repository.