@CacheableTask open class Pmd : SourceTask, VerificationTask, Reporting<PmdReports>
Runs a set of static code analysis rules on Java source code files and generates a report of problems found.
See Also
PmdPluginPmdExtension
Pmd() |
open fun getAntBuilder(): IsolatedAntBuilder |
|
open fun getClasspath(): FileCollection
Compile class path for the classes to be analyzed. The classes on this class path are used during analysis but aren't analyzed themselves. This is only well supported for PMD 5.2.1 or better. |
|
open fun getIgnoreFailures(): Boolean
Whether or not to allow the build to continue if there are warnings. Example: ignoreFailures = true |
|
open fun getObjectFactory(): ObjectFactory
Injects and returns an instance of org.gradle.api.model.ObjectFactory. |
|
open fun getPmdClasspath(): FileCollection
The class path containing the PMD library to be used. |
|
fun getReports(): PmdReports
The reports to be generated by this task. |
|
open fun getRulePriority(): Int
Specifies the rule priority threshold. |
|
open fun getRuleSetConfig(): TextResource
The custom rule set to be used (if any). Replaces |
|
open fun getRuleSetFiles(): FileCollection
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") |
|
open fun getRuleSets(): MutableList<String>
The built-in rule sets to be used. See the official list of built-in rule sets. Example: ruleSets = ["basic", "braces"] |
|
open fun getSource(): FileTree
{@inheritDoc} |
|
open fun getTargetJdk(): TargetJdk
The target JDK to use with PMD. |
|
open fun isConsoleOutput(): Boolean
Whether or not to write PMD results to |
|
open fun reports(closure: Closure<Any>): PmdReports open fun reports(configureAction: Action<in PmdReports>): PmdReports
Configures the reports to be generated by this task. |
|
open fun run(): Unit |
|
open fun setClasspath(classpath: FileCollection): Unit
Compile class path for the classes to be analyzed. The classes on this class path are used during analysis but aren't analyzed themselves. This is only well supported for PMD 5.2.1 or better. |
|
open fun setConsoleOutput(consoleOutput: Boolean): Unit
Whether or not to write PMD results to |
|
open fun setIgnoreFailures(ignoreFailures: Boolean): Unit
Whether or not to allow the build to continue if there are warnings. Example: ignoreFailures = true |
|
open fun setPmdClasspath(pmdClasspath: FileCollection): Unit
The class path containing the PMD library to be used. |
|
open fun setRulePriority(intValue: Int): Unit
Sets the rule priority threshold. |
|
open fun setRuleSetConfig(ruleSetConfig: TextResource): Unit
The custom rule set to be used (if any). Replaces |
|
open fun setRuleSetFiles(ruleSetFiles: FileCollection): Unit
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") |
|
open fun setRuleSets(ruleSets: MutableList<String>): Unit
The built-in rule sets to be used. See the official list of built-in rule sets. Example: ruleSets = ["basic", "braces"] |
|
open fun setTargetJdk(targetJdk: TargetJdk): Unit
The target JDK to use with PMD. |
|
open fun stdOutIsAttachedToTerminal(): Boolean |
|
open static fun validate(value: Int): Unit
Validates the value is a valid PMD RulePriority (1-5) |
open fun exclude(vararg excludes: String): SourceTask open fun exclude(excludes: MutableIterable<String>): SourceTask open fun exclude(excludeSpec: Spec<FileTreeElement>): SourceTask open fun exclude(excludeSpec: Closure<Any>): SourceTask
{@inheritDoc} |
|
open fun getExcludes(): MutableSet<String>
{@inheritDoc} |
|
open fun getIncludes(): MutableSet<String>
{@inheritDoc} |
|
open fun include(vararg includes: String): SourceTask open fun include(includes: MutableIterable<String>): SourceTask open fun include(includeSpec: Spec<FileTreeElement>): SourceTask open fun include(includeSpec: Closure<Any>): SourceTask
{@inheritDoc} |
|
open fun setExcludes(excludes: MutableIterable<String>): SourceTask
{@inheritDoc} |
|
open fun setIncludes(includes: MutableIterable<String>): SourceTask
{@inheritDoc} |
|
open fun setSource(source: FileTree): Unit
Sets the source for this task. open fun setSource(source: Any): Unit
Sets the source for this task. The given source object is evaluated as per |
|
open fun source(vararg sources: Any): SourceTask
Adds some source to this task. The given source objects will be evaluated as per |