Skip to content

Checkstyle

Groovy | Home | Release Notes | Plugin

By default, plugin activates if groovy sources available (src/main/groovy).

Output

24 (0 / 10 / 14) CodeNarc violations were found in 2 files

[Formatting | ClassJavadoc] sample.(GSample.groovy:3)  [priority 2]
    >> class GSample {
  Class sample.GSample missing Javadoc
  Makes sure each class and interface definition is preceded by javadoc. Enum definitions are not checked, due to strange behavior in the Groovy AST.
  http://codenarc.sourceforge.net/codenarc-rules-formatting.html#ClassJavadoc

...  

Counts in braces show priorities (p1/p2/p3).

Config

Tool config options with defaults:

quality {
    codenarcVersion = '2.2.0'
    codenarc = true // false to disable automatic plugin activation
}

Suppress

To suppress violation:

@SuppressWarnings("ClassJavadoc")

Since codenarc 2.2 CodeNarc. prefix could be used to differentiate with pure java suppressions:

@SuppressWarnings("CodeNarc.ClassJavadoc")

To suppress all violations use:

@SuppressWarnings('CodeNarc')

Also, comments may be used for disabling blocks of file.

Back to top