class Pmd extends SourceTask
Runs a set of static code analysis rules on Java source code files and generates a report of problems found.
Type | Name and description |
---|---|
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 and description |
---|
Pmd
() |
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() |
Whether or not to allow the build to continue if there are warnings. Example: ignoreFailures = true
The class path containing the PMD library to be used.
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")
The built-in rule sets to be used. See the official list of built-in rule sets. Example: ruleSets = ["basic", "braces"]
The target JDK to use with PMD.
Returns the reports to be generated by this task.
Configures the reports to be generated by this task.
Gradle API 2.0