# CodeNarcExtension

abstract class CodeNarcExtension : CodeQualityExtension(source)

Configuration options for the CodeNarc plugin.

#### See also

CodeNarcPlugin

## Constructors

CodeNarcExtension
Link copied to clipboard
constructor(project: Project)

## Properties

config
Link copied to clipboard
open var config: TextResource

## Functions

getConfigFile
Link copied to clipboard
open fun getConfigFile(): File
The CodeNarc configuration file to use.
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>
getMaxPriority1Violations
Link copied to clipboard
abstract fun getMaxPriority1Violations(): Property<Integer>
The maximum number of priority 1 violations allowed before failing the build.
getMaxPriority2Violations
Link copied to clipboard
abstract fun getMaxPriority2Violations(): Property<Integer>
The maximum number of priority 2 violations allowed before failing the build.
getMaxPriority3Violations
Link copied to clipboard
abstract fun getMaxPriority3Violations(): Property<Integer>
The maximum number of priority 3 violations allowed before failing the build.
getReportFormat
Link copied to clipboard
abstract fun getReportFormat(): Property<String>
The format type of the CodeNarc report.
getReportsDir
Link copied to clipboard
abstract fun getReportsDir(): DirectoryProperty
The directory where reports will be generated.
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(file: File)
The CodeNarc configuration file to use.