# CheckstyleExtension

abstract class CheckstyleExtension : CodeQualityExtension(source)

Configuration options for the Checkstyle plugin.

#### See also

CheckstylePlugin

## Constructors

CheckstyleExtension
Link copied to clipboard
constructor(project: Project)

## Properties

config
Link copied to clipboard
open var config: TextResource

## Functions

getConfigDirectory
Link copied to clipboard
abstract fun getConfigDirectory(): DirectoryProperty
Path to other Checkstyle configuration files.
getConfigFile
Link copied to clipboard
open fun getConfigFile(): File
The Checkstyle configuration file to use.
getConfigProperties
Link copied to clipboard
abstract fun getConfigProperties(): MapProperty<String, Any>
The properties available for use in the configuration file.
getEnableExternalDtdLoad
Link copied to clipboard
@Incubating
@Optional
@Input
abstract fun getEnableExternalDtdLoad(): Property<Boolean>
Enable the ability to use custom DTD files in config and load them from some location on all checkstyle tasks in this project.
getIgnoreFailures
Link copied to clipboard
abstract fun getIgnoreFailures(): Property<Boolean>
Whether to allow the build to continue if there are warnings.
getIsIgnoreFailures
Link copied to clipboard
open fun getIsIgnoreFailures(): Property<Boolean>
getIsShowViolations
Link copied to clipboard
open fun getIsShowViolations(): Property<Boolean>
getMaxErrors
Link copied to clipboard
abstract fun getMaxErrors(): Property<Integer>
The maximum number of errors that are tolerated before breaking the build or setting the failure property.
getMaxWarnings
Link copied to clipboard
abstract fun getMaxWarnings(): Property<Integer>
The maximum number of warnings that are tolerated before breaking the build or setting the failure property.
getReportsDir
Link copied to clipboard
abstract fun getReportsDir(): DirectoryProperty
The directory where reports will be generated.
getShowViolations
Link copied to clipboard
abstract fun getShowViolations(): Property<Boolean>
Whether rule violations are to be displayed on the console.
getSourceSets
Link copied to clipboard
abstract fun getSourceSets(): ListProperty<SourceSet>
The source sets to be analyzed as part of the `check` and `build` tasks.
getToolVersion
Link copied to clipboard
abstract fun getToolVersion(): Property<String>
The version of the code quality tool to be used.
setConfigFile
Link copied to clipboard
open fun setConfigFile(configFile: File)
The Checkstyle configuration file to use.