Overview | Package | Class | Deprecated | Index | Help
| Groovy Documentation
| FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.gradle.api.plugins.quality
[Java] Class CodeNarc

    java.lang.Object
      org.gradle.api.internal.ConventionTask
          org.gradle.api.tasks.SourceTask
              org.gradle.api.plugins.quality.CodeNarc

All Implemented Interfaces:
  VerificationTask

    public class CodeNarc
    extends SourceTask

Runs CodeNarc against some source files.

Method Summary
`void` | `check()`
`java.io.File` | `getConfigFile()` Returns the CodeNarc configuration file to use.
`java.io.File` | `getReportFile()` Returns the file to write the report to.
`java.lang.String` | `getReportFormat()` Returns the format type of the CodeNarc report.
`boolean` | `isIgnoreFailures()` {@inheritDoc}
`void` | `setConfigFile(java.io.File configFile)` Specifies the CodeNarc configuration file to use.
`CodeNarc` | `setIgnoreFailures(boolean ignoreFailures)` {@inheritDoc}
`void` | `setReportFile(java.io.File reportFile)`
`void` | `setReportFormat(java.lang.String reportFormat)` Specifies the format type of the CodeNarc report.

Methods inherited from class SourceTask
exclude, exclude, exclude, exclude, getDefaultSource, getExcludes, getIncludes, getSource, include, include, include, include, setExcludes, setIncludes, setSource, source

Method Detail

### check

    @TaskAction
    public void check()

### getConfigFile

    @InputFile
    public java.io.File getConfigFile()

  Returns the CodeNarc configuration file to use.
  Returns:
    The CodeNarc configuration file.

### getReportFile

    @OutputFile
    public java.io.File getReportFile()

  Returns the file to write the report to.
  Returns:
    The report file. Must not be null.

### getReportFormat

    @Input
    public java.lang.String getReportFormat()

  Returns the format type of the CodeNarc report.
  Returns:
    The format type of the CodeNarc report.

### isIgnoreFailures

    public boolean isIgnoreFailures()

  {@inheritDoc}

### setConfigFile

    public void setConfigFile(java.io.File configFile)

  Specifies the CodeNarc configuration file to use.
  Parameters:
    `configFile` - The CodeNarc configuration file.

### setIgnoreFailures

    public CodeNarc setIgnoreFailures(boolean ignoreFailures)

  {@inheritDoc}

### setReportFile

    public void setReportFile(java.io.File reportFile)

### setReportFormat

    public void setReportFormat(java.lang.String reportFormat)

  Specifies the format type of the CodeNarc report.
  Parameters:
    `reportFormat` - The format type of the CodeNarc report.

Groovy Documentation