Package: org.gradle.api.plugins.quality

## [Groovy] Class CodeNarcExtension

- org.gradle.api.plugins.quality.CodeNarcExtension

- - ### Properties Summary

    Properties
    Type | Name and description
    --- | ---
    `TextResource` | `config` The CodeNarc configuration to use.
    `int` | `maxPriority1Violations` The maximum number of priority 1 violations allowed before failing the build.
    `int` | `maxPriority2Violations` The maximum number of priority 2 violations allowed before failing the build.
    `int` | `maxPriority3Violations` The maximum number of priority 3 violations allowed before failing the build.
    `String` | `reportFormat` The format type of the CodeNarc report.

  - ### Constructor Summary

    Constructors
    Constructor and description
    `CodeNarcExtension (Project project)`

  - ### Methods Summary

    Methods
    Type | Name and description
    --- | ---
    `File` | `getConfigFile()` The CodeNarc configuration file to use.
    `void` | `setConfigFile(File file)` The CodeNarc configuration file to use.
    `void` | `setReportFormat(String reportFormat)`

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class Object` | `wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll`

- - ### Property Detail

    - #### @Incubating TextResource config

      The CodeNarc configuration to use. Replaces the `configFile` property.

      Since:
        2.2

    - #### int maxPriority1Violations

      The maximum number of priority 1 violations allowed before failing the build.

    - #### int maxPriority2Violations

      The maximum number of priority 2 violations allowed before failing the build.

    - #### int maxPriority3Violations

      The maximum number of priority 3 violations allowed before failing the build.

    - #### String reportFormat

      The format type of the CodeNarc report. One of `html`, `xml`, `text`, `console`.

  - ### Constructor Detail

    - #### CodeNarcExtension(Project project)

  - ### Method Detail

    - #### File getConfigFile()

      The CodeNarc configuration file to use.

    - #### void setConfigFile(File file)

      The CodeNarc configuration file to use.

    - #### void setReportFormat(String reportFormat)