Package: org.gradle.api.plugins.quality

## [Groovy] Class Pmd

- org.gradle.api.plugins.quality.Pmd

- All Implemented Interfaces and Traits:
    Reporting, VerificationTask

      class Pmd
      extends SourceTask

  Runs a set of static code analysis rules on Java source code files and generates a report of problems found.

  See Also:
    PmdPlugin

- - ### Properties Summary

    Properties
    Type | Name and description
    --- | ---
    `boolean` | `consoleOutput` Whether or not to write PMD results to `System.out`.
    `boolean` | `ignoreFailures` Whether or not to allow the build to continue if there are warnings.
    `FileCollection` | `pmdClasspath` The class path containing the PMD library to be used.
    `FileCollection` | `ruleSetFiles` The custom rule set files to be used.
    `List<String>` | `ruleSets` The built-in rule sets to be used.
    `TargetJdk` | `targetJdk` The target JDK to use with PMD.

  - ### Constructor Summary

    Constructors
    Constructor and description
    `Pmd ()`

  - ### Methods Summary

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

- - ### Property Detail

    - #### @Incubating boolean consoleOutput

      Whether or not to write PMD results to `System.out`.

    - #### boolean ignoreFailures

      Whether or not to allow the build to continue if there are warnings. Example: ignoreFailures = true

    - #### @InputFiles FileCollection pmdClasspath

      The class path containing the PMD library to be used.

    - #### @InputFiles FileCollection ruleSetFiles

      The custom rule set files to be used. See the official documentation for how to author a rule set file. Example: ruleSetFiles = files("config/pmd/myRuleSets.xml")

    - #### @Input List<String> ruleSets

      The built-in rule sets to be used. See the official list of built-in rule sets. Example: ruleSets = ["basic", "braces"]

    - #### @Input TargetJdk targetJdk

      The target JDK to use with PMD.

  - ### Constructor Detail

    - #### Pmd()

  - ### Method Detail

    - #### @Inject IsolatedAntBuilder getAntBuilder()

    - #### @Inject Instantiator getInstantiator()

    - #### PmdReports getReports()

      Returns the reports to be generated by this task.

    - #### PmdReports reports(Closure closure)

      Configures the reports to be generated by this task.

    - #### @TaskAction void run()

    - #### boolean stdOutIsAttachedToTerminal()