# 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
configProperties
Link copied to clipboard
open var configProperties: Map<String, Any>
maxErrors
Link copied to clipboard
open var maxErrors: Int
maxWarnings
Link copied to clipboard
open var maxWarnings: Int
sourceSets
Link copied to clipboard
open var sourceSets: Collection<SourceSet>
toolVersion
Link copied to clipboard
open var toolVersion: String

## 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.
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.
getReportsDir
Link copied to clipboard
@ReplacedBy(value = "reportsDirectory")
open fun getReportsDir(): File
The directory where reports will be generated.
getReportsDirectory
Link copied to clipboard
@Incubating
abstract fun getReportsDirectory(): DirectoryProperty
The directory where reports will be generated.
isIgnoreFailures
Link copied to clipboard
open fun isIgnoreFailures(): Boolean
Whether to allow the build to continue if there are warnings.
isShowViolations
Link copied to clipboard
open fun isShowViolations(): Boolean
Whether rule violations are to be displayed on the console.
setConfigFile
Link copied to clipboard
open fun setConfigFile(configFile: File)
The Checkstyle configuration file to use.
setConfigProperties
Link copied to clipboard
inline fun CheckstyleExtension. setConfigProperties(vararg configProperties: Pair<String, Any>)

Kotlin extension function for org.gradle.api.plugins.quality.CheckstyleExtension.setConfigProperties.

setIgnoreFailures
Link copied to clipboard
open fun setIgnoreFailures(ignoreFailures: Boolean)
Whether to allow the build to continue if there are warnings.
setReportsDir
Link copied to clipboard
open fun setReportsDir(reportsDir: File)
Sets the directory where reports will be generated.
setShowViolations
Link copied to clipboard
open fun setShowViolations(showViolations: Boolean)
Whether rule violations are to be displayed on the console.