Package org.codenarc.ant
Class CodeNarcTask
- java.lang.Object
-
- org.apache.tools.ant.ProjectComponent
-
- org.apache.tools.ant.Task
-
- org.codenarc.ant.CodeNarcTask
-
- All Implemented Interfaces:
groovy.lang.GroovyObject
,java.lang.Cloneable
public class CodeNarcTask extends org.apache.tools.ant.Task implements groovy.lang.GroovyObject
-
-
Field Summary
Fields Modifier and Type Field Description protected groovy.lang.Closure
createCodeNarcRunner
protected java.util.List
fileSets
protected java.util.List
reportWriters
protected RuleSet
ruleSet
-
Constructor Summary
Constructors Constructor Description CodeNarcTask()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addConfiguredReport(Report report)
void
addFileset(org.apache.tools.ant.types.FileSet fileSet)
org.apache.tools.ant.types.Path
createClasspath()
protected SourceAnalyzer
createSourceAnalyzer()
void
execute()
org.apache.tools.ant.types.Path
getClasspath()
java.lang.String
getExcludeBaseline()
int
getMaxPriority1Violations()
int
getMaxPriority2Violations()
int
getMaxPriority3Violations()
groovy.lang.MetaClass
getMetaClass()
java.lang.Object
getProperty(java.lang.String property)
java.lang.String
getRuleSetFiles()
java.lang.Object
invokeMethod(java.lang.String method, java.lang.Object arguments)
void
setClasspath(org.apache.tools.ant.types.Path value)
void
setClasspathRef(org.apache.tools.ant.types.Reference reference)
void
setExcludeBaseline(java.lang.String value)
void
setMaxPriority1Violations(int value)
void
setMaxPriority2Violations(int value)
void
setMaxPriority3Violations(int value)
void
setMetaClass(groovy.lang.MetaClass mc)
void
setProperty(java.lang.String property, java.lang.Object value)
void
setRuleSetFiles(java.lang.String value)
-
Methods inherited from class org.apache.tools.ant.Task
bindToOwner, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, log, log, maybeConfigure, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType
-
-
-
-
Field Detail
-
reportWriters
protected java.util.List reportWriters
-
fileSets
protected java.util.List fileSets
-
ruleSet
protected RuleSet ruleSet
-
createCodeNarcRunner
protected groovy.lang.Closure createCodeNarcRunner
-
-
Method Detail
-
getMetaClass
public groovy.lang.MetaClass getMetaClass()
- Specified by:
getMetaClass
in interfacegroovy.lang.GroovyObject
-
setMetaClass
public void setMetaClass(groovy.lang.MetaClass mc)
- Specified by:
setMetaClass
in interfacegroovy.lang.GroovyObject
-
invokeMethod
public java.lang.Object invokeMethod(java.lang.String method, java.lang.Object arguments)
- Specified by:
invokeMethod
in interfacegroovy.lang.GroovyObject
-
getProperty
public java.lang.Object getProperty(java.lang.String property)
- Specified by:
getProperty
in interfacegroovy.lang.GroovyObject
-
setProperty
public void setProperty(java.lang.String property, java.lang.Object value)
- Specified by:
setProperty
in interfacegroovy.lang.GroovyObject
-
getRuleSetFiles
public java.lang.String getRuleSetFiles()
-
setRuleSetFiles
public void setRuleSetFiles(java.lang.String value)
-
getExcludeBaseline
public java.lang.String getExcludeBaseline()
-
setExcludeBaseline
public void setExcludeBaseline(java.lang.String value)
-
getMaxPriority1Violations
public int getMaxPriority1Violations()
-
setMaxPriority1Violations
public void setMaxPriority1Violations(int value)
-
getMaxPriority2Violations
public int getMaxPriority2Violations()
-
setMaxPriority2Violations
public void setMaxPriority2Violations(int value)
-
getMaxPriority3Violations
public int getMaxPriority3Violations()
-
setMaxPriority3Violations
public void setMaxPriority3Violations(int value)
-
getClasspath
public org.apache.tools.ant.types.Path getClasspath()
-
setClasspath
public void setClasspath(org.apache.tools.ant.types.Path value)
-
execute
public void execute() throws org.apache.tools.ant.BuildException
- Overrides:
execute
in classorg.apache.tools.ant.Task
- Throws:
org.apache.tools.ant.BuildException
-
addFileset
public void addFileset(org.apache.tools.ant.types.FileSet fileSet)
-
addConfiguredReport
public void addConfiguredReport(Report report)
-
createClasspath
public org.apache.tools.ant.types.Path createClasspath()
-
setClasspathRef
public void setClasspathRef(org.apache.tools.ant.types.Reference reference)
-
createSourceAnalyzer
protected SourceAnalyzer createSourceAnalyzer()
-
-