org.codenarc.rule.junit
[Groovy] Class JUnitAssertAlwaysSucceedsRule
java.lang.Object
org.codenarc.rule.AbstractRule
org.codenarc.rule.AbstractAstVisitorRule
org.codenarc.rule.junit.JUnitAssertAlwaysSucceedsRule
class JUnitAssertAlwaysSucceedsRule
extends AbstractAstVisitorRule
Rule that checks for JUnit assert()
method calls with constant arguments
such that the assertion always succeeds. This includes:
assertTrue(true)
.
assertFalse(false)
.
assertNull(null)
.
This rule sets the default value of applyToFilesMatching
to only match source code file
paths ending in 'Test.groovy' or 'Tests.groovy'.
- Authors:
- Chris Mair
- Version:
- \$Revision: 553 \$ - \$Date: 2011-01-20 16:07:46 -0500 (Thu, 20 Jan 2011) \$
Methods inherited from class AbstractRule
|
applyTo, applyTo, createViolation, createViolation, createViolationForImport, createViolationForImport, getImportsSortedByLineNumber, getName, getPriority, isReady, packageNameForImport, setName, setPriority, sourceLineAndNumberForImport, sourceLineAndNumberForImport, toString, validate |
applyToClassNames
String applyToClassNames
-
astVisitorClass
Class astVisitorClass
-
name
String name
-
priority
int priority
-
Groovy Documentation