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 Checkstyle

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

All Implemented Interfaces:
  VerificationTask

    public class Checkstyle
    extends SourceTask

Runs Checkstyle against some source files.

Method Summary
`void` | `check()`
`FileCollection` | `getClasspath()` Returns the classpath containing the compiled classes for the source files to be inspected.
`java.io.File` | `getConfigFile()` Returns the Checkstyle configuration file to use.
`java.util.Map` | `getProperties()` Returns the properties available for use in the configuration file.
`java.io.File` | `getResultFile()` Returns the file to generate the XML results to.
`boolean` | `isIgnoreFailures()` {@inheritDoc}
`void` | `setClasspath(FileCollection classpath)` Specified the classpath containing the compiled classes for the source file to be inspected.
`void` | `setConfigFile(java.io.File configFile)` Specifies the Checkstyle configuration file to use.
`Checkstyle` | `setIgnoreFailures(boolean ignoreFailures)` {@inheritDoc}
`void` | `setProperties(java.util.Map properties)`
`void` | `setResultFile(java.io.File resultFile)` Specifies the file to generate the XML results to.

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()

### getClasspath

    @InputFiles
    public FileCollection getClasspath()

  Returns the classpath containing the compiled classes for the source files to be inspected.
  Returns:
    The classpath.

### getConfigFile

    @InputFile
    public java.io.File getConfigFile()

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

### getProperties

    public java.util.Map getProperties()

  Returns the properties available for use in the configuration file. These are substituted into the configuration file.
  Returns:
    The properties available in the configuration file. Returns an empty map when there are no such properties.

### getResultFile

    @OutputFile
    public java.io.File getResultFile()

  Returns the file to generate the XML results to.
  Returns:
    The result XML file.

### isIgnoreFailures

    public boolean isIgnoreFailures()

  {@inheritDoc}

### setClasspath

    public void setClasspath(FileCollection classpath)

  Specified the classpath containing the compiled classes for the source file to be inspected.
  Parameters:
    `classpath` - The classpath. Must not be null.

### setConfigFile

    public void setConfigFile(java.io.File configFile)

  Specifies the Checkstyle configuration file to use.
  Parameters:
    `configFile` - The configuration file. Must not be null.

### setIgnoreFailures

    public Checkstyle setIgnoreFailures(boolean ignoreFailures)

  {@inheritDoc}

### setProperties

    public void setProperties(java.util.Map properties)

### setResultFile

    public void setResultFile(java.io.File resultFile)

  Specifies the file to generate the XML results to.
  Parameters:
    `resultFile` - The result XML file. Must not be null.

Groovy Documentation