public class CheckstyleExtension extends CodeQualityExtension
CheckstylePlugin
Constructor | Description |
---|---|
CheckstyleExtension(Project project) |
Modifier and Type | Method | Description |
---|---|---|
TextResource |
getConfig() |
The Checkstyle configuration to use.
|
File |
getConfigDir() |
Path to other Checkstyle configuration files.
|
DirectoryProperty |
getConfigDirectory() |
Gets the configuration directory.
|
File |
getConfigFile() |
The Checkstyle configuration file to use.
|
Map<String,Object> |
getConfigProperties() |
The properties available for use in the configuration file.
|
int |
getMaxErrors() |
The maximum number of errors that are tolerated before breaking the build
or setting the failure property.
|
int |
getMaxWarnings() |
The maximum number of warnings that are tolerated before breaking the build
or setting the failure property.
|
boolean |
isShowViolations() |
Whether rule violations are to be displayed on the console.
|
void |
setConfig(TextResource config) |
The Checkstyle configuration to use.
|
void |
setConfigDir(File configDir) |
Path to other Checkstyle configuration files.
|
void |
setConfigFile(File configFile) |
The Checkstyle configuration file to use.
|
void |
setConfigProperties(Map<String,Object> configProperties) |
The properties available for use in the configuration file.
|
void |
setMaxErrors(int maxErrors) |
Set the maximum number of errors that are tolerated before breaking the build.
|
void |
setMaxWarnings(int maxWarnings) |
Set the maximum number of warnings that are tolerated before breaking the build.
|
void |
setShowViolations(boolean showViolations) |
Whether rule violations are to be displayed on the console.
|
getReportsDir, getSourceSets, getToolVersion, isIgnoreFailures, setIgnoreFailures, setReportsDir, setSourceSets, setToolVersion
public CheckstyleExtension(Project project)
public File getConfigFile()
public void setConfigFile(File configFile)
public TextResource getConfig()
configFile
property.public void setConfig(TextResource config)
configFile
property.public Map<String,Object> getConfigProperties()
public void setConfigProperties(Map<String,Object> configProperties)
@Incubating public File getConfigDir()
$rootProject.projectDir/config/checkstyle
This path will be exposed as the variable config_loc
in Checkstyle's configuration files.
@Incubating public void setConfigDir(File configDir)
$rootProject.projectDir/config/checkstyle
This path will be exposed as the variable config_loc
in Checkstyle's configuration files.
@Incubating public DirectoryProperty getConfigDirectory()
public int getMaxErrors()
Example: maxErrors = 42
public void setMaxErrors(int maxErrors)
maxErrors
- number of errors allowedpublic int getMaxWarnings()
Example: maxWarnings = 1000
public void setMaxWarnings(int maxWarnings)
maxWarnings
- number of warnings allowedpublic boolean isShowViolations()
public void setShowViolations(boolean showViolations)