|
Groovy Documentation | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | PROPERTY | CONSTR | METHOD | DETAIL: FIELD | PROPERTY | CONSTR | METHOD |
java.lang.Objectorg.apache.tools.ant.ProjectComponent
org.apache.tools.ant.Task
org.codenarc.ant.CodeNarcTask
class CodeNarcTask extends org.apache.tools.ant.Task
Ant Task for running CodeNarc.
TheruleSetFiles
property specifies the path to the Groovy or XML RuleSet
definition files, relative to the classpath. This can be a single file path, or multiple
paths separated by commas. It is required.
The maxPriority1Violations
property specifies the maximum number of priority 1
violations allowed before failing the build (throwing a BuildException). Likewise,
maxPriority2Violations
and maxPriority3Violations
specifiy the
thresholds for violations of priority 2 and 3.
At least one nested fileset
element is required, and is used to specify the source files
to be analyzed. This is the standard Ant FileSet, and is quite powerful and flexible.
See the Apache Ant Manual for more information on FileSets.
The option
elements, with name
, and
value
attributes.
Property Summary | |
---|---|
protected def |
createCodeNarcRunner
|
protected List |
fileSets
|
int |
maxPriority1Violations
|
int |
maxPriority2Violations
|
int |
maxPriority3Violations
|
protected List |
reportWriters
|
protected def |
ruleSet
|
String |
ruleSetFiles
The path to the Groovy or XML RuleSet definition files, relative to the classpath. |
Constructor Summary | |
CodeNarcTask()
|
Method Summary | |
---|---|
void
|
addConfiguredReport(Report report)
Ant-defined method (by convention), called with each instance of a nested |
void
|
addFileset(FileSet fileSet)
|
protected SourceAnalyzer
|
createSourceAnalyzer()
Create and return the SourceAnalyzer |
void
|
execute()
Execute this Ant Task |
Methods inherited from class org.apache.tools.ant.Task | |
---|---|
log, log, log, log, init, execute, maybeConfigure, getTaskName, getOwningTarget, setRuntimeConfigurableWrapper, getTaskType, setTaskType, setTaskName, setOwningTarget, getRuntimeConfigurableWrapper, reconfigure, perform, bindToOwner, clone, getLocation, getDescription, setLocation, getProject, setDescription, setProject, wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll |
Methods inherited from class org.apache.tools.ant.ProjectComponent | |
---|---|
clone, log, log, getLocation, getDescription, setLocation, getProject, setDescription, setProject, wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll |
Methods inherited from class Object | |
---|---|
wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll |
Property Detail |
---|
protected def createCodeNarcRunner
protected List fileSets
int maxPriority1Violations
int maxPriority2Violations
int maxPriority3Violations
protected List reportWriters
protected def ruleSet
String ruleSetFiles
Constructor Detail |
---|
CodeNarcTask()
Method Detail |
---|
void addConfiguredReport(Report report)
void addFileset(FileSet fileSet)
protected SourceAnalyzer createSourceAnalyzer()
void execute()
Groovy Documentation