Groovy Documentation

groovy.org.codenarc.rule.unused
[Groovy] Class UnusedPrivateFieldRule

java.lang.Object
  org.codenarc.rule.AbstractSharedAstVisitorRule
      groovy.org.codenarc.rule.unused.UnusedPrivateFieldRule

class UnusedPrivateFieldRule
extends AbstractSharedAstVisitorRule

Rule that checks for private fields that are not referenced within the same class.

The ignoreFieldNames property optionally specifies one or more (comma-separated) field names that should be ignored (i.e., that should not cause a rule violation). The name(s) may optionally include wildcard characters ('*' or '?').

Authors:
Chris Mair
Hamlet D'Arcy


Property Summary
String ignoreFieldNames

String name

int priority

 
Method Summary
protected AstVisitor getAstVisitor(SourceCode sourceCode)

protected List getViolations(AstVisitor visitor, SourceCode sourceCode)

 

Property Detail

ignoreFieldNames

String ignoreFieldNames


name

String name


priority

int priority


 
Method Detail

getAstVisitor

@Override
protected AstVisitor getAstVisitor(SourceCode sourceCode)


getViolations

@Override
protected List getViolations(AstVisitor visitor, SourceCode sourceCode)


 

Groovy Documentation