Groovy Documentation

org.codenarc.rule.generic
Class IllegalRegexRule

java.lang.Object
  org.codenarc.rule.AbstractRule
      org.codenarc.rule.generic.IllegalRegexRule

class IllegalRegexRule
extends AbstractRule

Checks for a specified illegal regular expression within the source code.

The regex 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.

author:
Chris Mair
version:
$Revision: 175 $ - $Date: 2009-06-22 22:22:57 -0400 (Mon, 22 Jun 2009) $


Property Summary
String name

int priority

String regex

 
Constructor Summary
IllegalRegexRule()

 
Method Summary
void applyTo(SourceCode sourceCode, List violations)

boolean isReady()

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

Property Detail

name

String name


priority

int priority


regex

String regex


 
Constructor Detail

IllegalRegexRule

IllegalRegexRule()


 
Method Detail

applyTo

void applyTo(SourceCode sourceCode, List violations)


isReady

boolean isReady()


 

Groovy Documentation