public class CheckStyleTask extends org.apache.tools.ant.Task
| Modifier and Type | Class and Description |
|---|---|
static class |
CheckStyleTask.Formatter
Details about a formatter to be used.
|
static class |
CheckStyleTask.FormatterType
Poor mans enumeration for the formatter types.
|
static class |
CheckStyleTask.Listener
Represents a custom listener.
|
static class |
CheckStyleTask.Property
Represents a property that consists of a key and value.
|
| Constructor and Description |
|---|
CheckStyleTask() |
| Modifier and Type | Method and Description |
|---|---|
void |
addFileset(org.apache.tools.ant.types.FileSet fS)
Adds uset of files (nested fileset attribute).
|
void |
addFormatter(CheckStyleTask.Formatter formatter)
Add a formatter.
|
void |
addProperty(CheckStyleTask.Property property)
Add an override property.
|
org.apache.tools.ant.types.Path |
createClasspath() |
void |
execute() |
protected AuditListener[] |
getListeners()
Return the list of listeners set in this task.
|
protected List<File> |
scanFileSets()
returns the list of files (full path name) to process.
|
void |
setClasspath(org.apache.tools.ant.types.Path classpath)
Set the class path.
|
void |
setClasspathRef(org.apache.tools.ant.types.Reference classpathRef)
Set the class path from a reference defined elsewhere.
|
void |
setConfig(File file) |
void |
setConfigURL(URL url) |
void |
setFailOnViolation(boolean fail) |
void |
setFailureProperty(String propertyName)
Tells this task to set the named property to "true" when there
is a violation.
|
void |
setFile(File file) |
void |
setMaxErrors(int maxErrors)
Sets the maximum number of errors allowed.
|
void |
setMaxWarnings(int maxWarnings)
Sets the maximum number of warings allowed.
|
void |
setOmitIgnoredModules(boolean omit) |
void |
setProperties(File props)
Sets a properties file for use instead
of individually setting them.
|
bindToOwner, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, log, log, maybeConfigure, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskTypepublic CheckStyleTask()
public void setFailureProperty(String propertyName)
propertyName - the name of the property to set
in the event of an failure.public void setFailOnViolation(boolean fail)
fail - whether to fail if a violation is foundpublic void setMaxErrors(int maxErrors)
maxErrors - the maximum number of errors allowed.public void setMaxWarnings(int maxWarnings)
Integer.MAX_VALUE.maxWarnings - the maximum number of warnings allowed.public void addFileset(org.apache.tools.ant.types.FileSet fS)
fS - the file set to addpublic void addFormatter(CheckStyleTask.Formatter formatter)
formatter - the formatter to add for logging.public void addProperty(CheckStyleTask.Property property)
property - the property to addpublic void setClasspath(org.apache.tools.ant.types.Path classpath)
classpath - the path to locate clusespublic void setClasspathRef(org.apache.tools.ant.types.Reference classpathRef)
classpathRef - the reference to an instance defining the classpathpublic org.apache.tools.ant.types.Path createClasspath()
public void setConfigURL(URL url)
url - the URL of the configuration to usepublic void setOmitIgnoredModules(boolean omit)
omit - whether to omit ignored modulespublic void setProperties(File props)
props - the properties File to usepublic void execute() throws org.apache.tools.ant.BuildException
execute in class org.apache.tools.ant.Taskorg.apache.tools.ant.BuildExceptionprotected AuditListener[] getListeners() throws ClassNotFoundException, InstantiationException, IllegalAccessException, IOException
ClassNotFoundException - if an error occursInstantiationException - if an error occursIllegalAccessException - if an error occursIOException - if an error occursprotected List<File> scanFileSets()
Copyright © 2001–2015. All rights reserved.