org.codenarc.rule.dry
[Groovy] Class DuplicateNumberLiteralRule
java.lang.Object
org.codenarc.rule.AbstractRule
org.codenarc.rule.AbstractAstVisitorRule
org.codenarc.rule.dry.DuplicateNumberLiteralRule
class DuplicateNumberLiteralRule
extends AbstractAstVisitorRule
Checks for duplication of constant number literal values.
Set the optional ignoreNumbers
property to a comma-separated list (String) of
the numbers that should be ignored by this rule (i.e., not cause a violation). This property
defaults to "0,1" to ignore the constants zero and one.
- Authors:
- Chris Mair
- Version:
- \$Revision: 465 \$ - \$Date: 2010-11-12 20:12:55 -0500 (Fri, 12 Nov 2010) \$
Methods inherited from class AbstractRule
|
applyTo, applyTo, createViolation, createViolation, createViolationForImport, createViolationForImport, getImportsSortedByLineNumber, getName, getPriority, isReady, packageNameForImport, setName, setPriority, sourceLineAndNumberForImport, sourceLineAndNumberForImport, toString, validate |
doNotApplyToFilesMatching
String doNotApplyToFilesMatching
-
ignoreNumbers
String ignoreNumbers
-
name
String name
-
priority
int priority
-
getAstVisitor
@Override
AstVisitor getAstVisitor()
-
Groovy Documentation