# CodeNarcExtension

abstract class CodeNarcExtension : CodeQualityExtension

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
maxPriority1Violations
Link copied to clipboard
open var maxPriority1Violations: Int
maxPriority2Violations
Link copied to clipboard
open var maxPriority2Violations: Int
maxPriority3Violations
Link copied to clipboard
open var maxPriority3Violations: Int
reportFormat
Link copied to clipboard
open var reportFormat: String
sourceSets
Link copied to clipboard
open var sourceSets: Collection<SourceSet>
toolVersion
Link copied to clipboard
open var toolVersion: String

## Functions

getConfigFile
Link copied to clipboard
open fun getConfigFile(): File
The CodeNarc configuration file to use.
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.
setConfigFile
Link copied to clipboard
open fun setConfigFile(file: File)
The CodeNarc configuration file to use.
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.