CodeNarc 0.5 - Static Analysis for Groovy

CodeNarc is a static analysis tool for Groovy source code.

See example reports from Groovy-based open source projects: Grails, Griffon and Gradle .

Version 0.5

  • 9 new rules (for a total of 58), including 4 rules specifically for Grails projects
  • Run CodeNarc as a command-line application (org.codenarc.CodeNarc).
  • Create new rules using Groovy scripts.
  • Filter rules based on class and/or package (applyToClassNames and doNotApplyToClassNames)
  • Normalize all separators (/,\) in SourceCode paths to '/'.

New Rules

  • GrailsStatelessServiceRule (grails)
  • GrailsPublicControllerMethodRule (grails)
  • GrailsServletContextReferenceRule (grails)
  • GrailsSessionReferenceRule (grails)
  • StatelessClassRule (generic)
  • EmptySynchronizedStatementRule (basic).
  • EmptySwitchStatementRule (basic).
  • EqualsAndHashCodeRule (basic)
  • JUnitPublicNonTestMethodRule (junit).

0

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)