Groovy Documentation

groovy.org.codenarc.rule.basic
[Groovy] Class ComparisonWithSelfRule

java.lang.Object
  org.codenarc.rule.AbstractAstVisitorRule
      groovy.org.codenarc.rule.basic.ComparisonWithSelfRule

class ComparisonWithSelfRule
extends AbstractAstVisitorRule

CodeNarc Rule. Checks for using a comparison operator or equals() or compareTo() to compare a variable to itself, e.g.: x == x, x != x, x <=> x, x < x, x > x, x <= x, x >= x, x.equals(x), x.compareTo(x) where x is a variable

Authors:
Chris Mair


Property Summary
Class astVisitorClass

String name

int priority

 

Property Detail

astVisitorClass

Class astVisitorClass


name

String name


priority

int priority


 

Groovy Documentation