Package: org.gradle.api.plugins.quality

## [Groovy] Class CodeNarc

- org.gradle.api.plugins.quality.CodeNarc

- All Implemented Interfaces and Traits:
    Reporting, VerificationTask

      class CodeNarc
      extends SourceTask

  Runs CodeNarc against some source files.

- - ### Properties Summary

    Properties
    Type | Name and description
    --- | ---
    `FileCollection` | `codenarcClasspath` The class path containing the CodeNarc library to be used.
    `File` | `configFile` The CodeNarc configuration file to use.
    `boolean` | `ignoreFailures` Whether or not the build should break when the verifications performed by this task fail.
    `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.

  - ### Constructor Summary

    Constructors
    Constructor and description
    `CodeNarc ()`

  - ### Methods Summary

    Methods
    Type | Name and description
    --- | ---
    `IsolatedAntBuilder` | `getAntBuilder()`
    `Instantiator` | `getInstantiator()`
    `CodeNarcReports` | `getReports()` Returns the reports to be generated by this task.
    `CodeNarcReports` | `reports(Closure closure)` Configures the reports to be generated by this task.
    `void` | `run()`

- - ### Property Detail

    - #### @InputFiles FileCollection codenarcClasspath

      The class path containing the CodeNarc library to be used.

    - #### @InputFile File configFile

      The CodeNarc configuration file to use.

    - #### boolean ignoreFailures

      Whether or not the build should break when the verifications performed by this task fail.

    - #### @Input int maxPriority1Violations

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

    - #### @Input int maxPriority2Violations

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

    - #### @Input int maxPriority3Violations

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

  - ### Constructor Detail

    - #### CodeNarc()

  - ### Method Detail

    - #### @Inject IsolatedAntBuilder getAntBuilder()

    - #### @Inject Instantiator getInstantiator()

    - #### CodeNarcReports getReports()

      Returns the reports to be generated by this task.

    - #### CodeNarcReports reports(Closure closure)

      Configures the reports to be generated by this task.

    - #### @TaskAction void run()