Groovy Documentation

org.codenarc.rule.size
Class ClassSizeRule

java.lang.Object
  org.codenarc.rule.AbstractRule
      org.codenarc.rule.AbstractAstVisitorRule
          org.codenarc.rule.size.ClassSizeRule

class ClassSizeRule
extends AbstractAstVisitorRule

Rule that checks the size of a class.

The maxLines property holds the threshold value for the maximum number of lines. A class length (number of lines) greater than that value is considered a violation. The maxLines property defaults to 1000.

author:
Chris Mair
version:
$Revision: 120 $ - $Date: 2009-04-06 12:58:09 -0400 (Mon, 06 Apr 2009) $


Property Summary
Class astVisitorClass

int maxLines

String name

int priority

 
Constructor Summary
ClassSizeRule()

 
Method Summary
 
Methods inherited from class AbstractAstVisitorRule
shouldApplyThisRuleTo
 
Methods inherited from class AbstractRule
applyTo, createViolation, createViolation, createViolationForImport, createViolationForImport, getImportsSortedByLineNumber, getName, getPriority, packageNameForImport, setName, setPriority, sourceLineAndNumberForImport, sourceLineAndNumberForImport
 

Property Detail

astVisitorClass

Class astVisitorClass


maxLines

int maxLines


name

String name


priority

int priority


 
Constructor Detail

ClassSizeRule

ClassSizeRule()


 

Groovy Documentation