Groovy Documentation

groovy.org.codenarc.rule.unnecessary
[Groovy] Class UnnecessaryObjectReferencesRule

java.lang.Object
  org.codenarc.rule.AbstractAstVisitorRule
      groovy.org.codenarc.rule.unnecessary.UnnecessaryObjectReferencesRule

class UnnecessaryObjectReferencesRule
extends AbstractAstVisitorRule

Violations are triggered when an excessive set of consecutive statements all reference the same variable. This can be made more readable by using a with or identity block.

Authors:
Hamlet D'Arcy


Property Summary
Class astVisitorClass

int maxReferencesAllowed

String name

int priority

 

Property Detail

astVisitorClass

Class astVisitorClass


maxReferencesAllowed

int maxReferencesAllowed


name

String name


priority

int priority


 

Groovy Documentation