com.puppycrawl.tools.checkstyle
public class CheckStyleTask extends Task
Nested Class Summary | |
---|---|
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. |
Method Summary | |
---|---|
void | addFileset(FileSet aFS)
Adds a set of files (nested fileset attribute). |
void | addFormatter(CheckStyleTask.Formatter aFormatter)
Add a formatter. |
void | addProperty(CheckStyleTask.Property aProperty)
Add an override property. |
Path | createClasspath() |
void | execute()
Actually checks the files specified. |
protected AuditListener[] | getListeners()
Return the list of listeners set in this task. |
protected File[] | scanFileSets()
returns the list of files (full path name) to process. |
void | setClasspath(Path aClasspath)
Set the class path. |
void | setClasspathRef(Reference aClasspathRef)
Set the class path from a reference defined elsewhere. |
void | setConfig(File aFile) |
void | setConfigURL(URL aURL) |
void | setFailOnViolation(boolean aFail) |
void | setFailureProperty(String aPropertyName)
Tells this task to set the named property to "true" when there
is a violation. |
void | setFile(File aFile) |
void | setMaxErrors(int aMaxErrors)
Sets the maximum number of errors allowed. |
void | setMaxWarnings(int aMaxWarnings)
Sets the maximum number of warings allowed. |
void | setPackageNamesFile(File aFile) |
void | setProperties(File aProps)
Sets a properties file for use instead
of individually setting them. |
Parameters: aFS the file set to add
Parameters: aFormatter the formatter to add for logging.
Parameters: aProperty the property to add
Returns: a created path for locating classes
Throws: BuildException an error occurred
Returns: the list of listeners.
Throws: ClassNotFoundException if an error occurs InstantiationException if an error occurs IllegalAccessException if an error occurs IOException if an error occurs
Returns: the list of files included via the filesets.
Parameters: aClasspath the path to locate classes
Parameters: aClasspathRef the reference to an instance defining the classpath
Parameters: aFile the configuration file to use
Parameters: aURL the URL of the configuration to use
Parameters: aFail whether to fail if a violation is found
Parameters: aPropertyName the name of the property to set in the event of an failure.
Parameters: aFile the file to be checked
Parameters: aMaxErrors the maximum number of errors allowed.
Parameters: aMaxWarnings the maximum number of warnings allowed.
Parameters: aFile the package names file to use
Parameters: aProps the properties File to use