# CheckstyleExtension

API Documentation: | `CheckstyleExtension`

### Properties

Property | Description
`configFile` | The Checkstyle configuration file to use.
`configProperties` | The properties available for use in the configuration file. These are substituted into the configuration file.
`ignoreFailures` | Whether or not to allow the build to continue if there are warnings. Example: ignoreFailures = true
`reportsDir` | The directory where reports will be generated.
`showViolations` | Whether or not rule violations are to be displayed on the console. Defaults to `true`. Example: showViolations = false
`sourceSets` | The source sets to be analyzed as part of the `check` and `build` tasks.
`toolVersion` | The version of the code quality tool to be used.

### Property details

#### `File` `configFile`

The Checkstyle configuration file to use.

Default with `checkstyle` plugin:
  ``${project.projectDir}`/config/checkstyle/checkstyle.xml`
Default with `code-quality` plugin:
  `project.checkstyleConfigFile`

#### ``Map`<`String`, `Object`>` `configProperties`

The properties available for use in the configuration file. These are substituted into the configuration file.

Default with `checkstyle` plugin:
  `[:]`
Default with `code-quality` plugin:
  `project.checkstyleProperties`

#### `boolean` `ignoreFailures`

Whether or not to allow the build to continue if there are warnings. Example: ignoreFailures = true

Default:
  `false`

#### `File` `reportsDir`

The directory where reports will be generated.

#### `boolean` `showViolations`

Whether or not rule violations are to be displayed on the console. Defaults to `true`. Example: showViolations = false

Default with `checkstyle` plugin:
  `true`
Default with `code-quality` plugin:
  `true`

#### ``Collection`<`SourceSet`>` `sourceSets`

The source sets to be analyzed as part of the `check` and `build` tasks.

Default:
  `project.sourceSets`

#### `String` `toolVersion`

The version of the code quality tool to be used.

### Script blocks

No script blocks

### Methods

No methods