# 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
reportsDir
Link copied to clipboard
open var reportsDir: File
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.
isIgnoreFailures
Link copied to clipboard
open fun isIgnoreFailures(): Boolean
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)
setShowViolations
Link copied to clipboard
open fun setShowViolations(showViolations: Boolean)
Whether rule violations are to be displayed on the console.