public class Checkstyle extends SourceTask implements VerificationTask, Reporting<CheckstyleReports>
Task.NamersourceTASK_ACTION, TASK_DEPENDS_ON, TASK_DESCRIPTION, TASK_GROUP, TASK_NAME, TASK_OVERWRITE, TASK_TYPE| Constructor and Description |
|---|
Checkstyle() |
| Modifier and Type | Method and Description |
|---|---|
org.gradle.api.internal.project.IsolatedAntBuilder |
getAntBuilder() |
FileCollection |
getCheckstyleClasspath()
The class path containing the Checkstyle library to be used.
|
FileCollection |
getClasspath()
The class path containing the compiled classes for the source files to be analyzed.
|
TextResource |
getConfig()
The Checkstyle configuration to use.
|
File |
getConfigFile()
The Checkstyle configuration file to use.
|
Map<String,Object> |
getConfigProperties()
The properties available for use in the configuration file.
|
boolean |
getIgnoreFailures()
Whether or not this task will ignore failures and continue running the build.
|
org.gradle.internal.reflect.Instantiator |
getInstantiator() |
CheckstyleReports |
getReports()
The reports to be generated by this task.
|
boolean |
isIgnoreFailures()
Whether or not this task will ignore failures and continue running the build.
|
boolean |
isShowViolations()
Whether or not rule violations are to be displayed on the console.
|
CheckstyleReports |
reports(Action<? super CheckstyleReports> configureAction)
Configures the reports to be generated by this task.
|
CheckstyleReports |
reports(Closure closure)
Configures the reports to be generated by this task.
|
void |
run() |
void |
setCheckstyleClasspath(FileCollection checkstyleClasspath) |
void |
setClasspath(FileCollection classpath) |
void |
setConfig(TextResource config) |
void |
setConfigFile(File configFile)
The Checkstyle configuration file to use.
|
void |
setConfigProperties(Map<String,Object> configProperties) |
void |
setIgnoreFailures(boolean ignoreFailures)
Specifies whether the build should break when the verifications performed by this task fail.
|
void |
setShowViolations(boolean showViolations) |
exclude, exclude, exclude, exclude, getExcludes, getIncludes, getPatternSetFactory, getSource, include, include, include, include, setExcludes, setIncludes, setSource, sourceconventionMapping, conventionMapping, getConventionMappingaddValidator, appendParallelSafeAction, compareTo, configure, deleteAllActions, dependsOn, dependsOnTaskDidWork, doFirst, doFirst, doLast, doLast, execute, finalizedBy, getActionClassLoaders, getActions, getAnt, getAsDynamicObject, getConvention, getDependsOn, getDescription, getDidWork, getEnabled, getExecuter, getExtensions, getFinalizedBy, getGroup, getImpliesSubProjects, getInputs, getLogger, getLogging, getMustRunAfter, getName, getOnlyIf, getOutputs, getPath, getProject, getServices, getShouldRunAfter, getStandardOutputCapture, getState, getTaskActions, getTaskDependencies, getTemporaryDir, getTemporaryDirFactory, getValidators, hasProperty, injectIntoNewInstance, isEnabled, isHasCustomActions, leftShift, mustRunAfter, onlyIf, onlyIf, prependParallelSafeAction, property, setActions, setDependsOn, setDescription, setDidWork, setEnabled, setExecuter, setFinalizedBy, setGroup, setImpliesSubProjects, setMustRunAfter, setOnlyIf, setOnlyIf, setProperty, setShouldRunAfter, shouldRunAfter, toStringpublic void setConfigFile(File configFile)
@Inject public org.gradle.internal.reflect.Instantiator getInstantiator()
@Inject public org.gradle.api.internal.project.IsolatedAntBuilder getAntBuilder()
public CheckstyleReports reports(@DelegatesTo(value=CheckstyleReports.class,strategy=1) Closure closure)
checkstyleTask {
reports {
html {
destination "build/codenarc.html"
}
}
}
reports in interface Reporting<CheckstyleReports>closure - The configurationpublic CheckstyleReports reports(Action<? super CheckstyleReports> configureAction)
checkstyleTask {
reports {
html {
destination "build/codenarc.html"
}
}
}
reports in interface Reporting<CheckstyleReports>configureAction - The configurationpublic void run()
@OrderSensitive @InputFiles public FileCollection getCheckstyleClasspath()
public void setCheckstyleClasspath(FileCollection checkstyleClasspath)
@OrderSensitive @InputFiles public FileCollection getClasspath()
public void setClasspath(FileCollection classpath)
@Incubating public TextResource getConfig()
configFile property.public void setConfig(TextResource config)
@Input @Optional public Map<String,Object> getConfigProperties()
public final CheckstyleReports getReports()
getReports in interface Reporting<CheckstyleReports>@Input public boolean getIgnoreFailures()
getIgnoreFailures in interface VerificationTaskpublic boolean isIgnoreFailures()
public void setIgnoreFailures(boolean ignoreFailures)
VerificationTasksetIgnoreFailures in interface VerificationTaskignoreFailures - false to break the build on failure, true to ignore the failures. The default is false.@Console public boolean isShowViolations()
public void setShowViolations(boolean showViolations)