|
Groovy Documentation | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | PROPERTY | CONSTR | METHOD | DETAIL: FIELD | PROPERTY | CONSTR | METHOD |
java.lang.Objectorg.codenarc.rule.AbstractRule
org.codenarc.rule.generic.RequiredRegexRule
class RequiredRegexRule extends AbstractRule
Checks for a specified regular expression that must exist within the source code.
Theregex
property specifies the regular expression to check for. If null or empty, do nothing.
A RuleSet can contain any number of instances of this rule, but each should be configured
with a unique rule name, regex, violationMessage and (optionally) customized priority.
Property Summary | |
---|---|
String |
name
|
int |
priority
|
String |
regex
|
Constructor Summary | |
RequiredRegexRule()
|
Method Summary | |
---|---|
void
|
applyTo(SourceCode sourceCode, List violations)
|
boolean
|
isReady()
|
Property Detail |
---|
String name
int priority
String regex
Constructor Detail |
---|
RequiredRegexRule()
Method Detail |
---|
void applyTo(SourceCode sourceCode, List violations)
boolean isReady()
Groovy Documentation