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 integrates with other many other tools and frameworks, including Gradle, Grails, Griffon, Maven, Sonar and Hudson. See Integration with Other Tools / Frameworks.

CodeNarc was influenced by the wonderful PMD and Checkstyle tools for analyzing Java source code, as well as the extensive Groovy static analysis checks performed by the IntelliJ IDEA IDE.