Configuration options for the PMD plugin.
Constructor and description |
---|
PmdExtension
(Project project) |
Type | Name and description |
---|---|
boolean |
getConsoleOutput() Whether or not to write PMD results to System.out . |
int |
getRulePriority() The rule priority threshold; violations for rules with a lower priority will not be reported. |
TextResource |
getRuleSetConfig() The custom rule set to be used (if any). |
FileCollection |
getRuleSetFiles() The custom rule set files to be used. |
List<String> |
getRuleSets() The built-in rule sets to be used. |
TargetJdk |
getTargetJdk() The target jdk to use with pmd, 1.3, 1.4, 1.5, 1.6, 1.7 or jsp |
boolean |
isConsoleOutput() |
void |
ruleSetFiles(Object... ruleSetFiles) Convenience method for adding rule set files. |
void |
ruleSets(String... ruleSets) Convenience method for adding rule sets. |
void |
setConsoleOutput(boolean consoleOutput) |
void |
setRulePriority(int intValue) Sets the rule priority threshold. |
void |
setRuleSetConfig(TextResource ruleSetConfig) |
void |
setRuleSetFiles(FileCollection ruleSetFiles) |
void |
setRuleSets(List<String> ruleSets) |
void |
setTargetJdk(Object value) Sets the target jdk used with pmd. |
Methods inherited from class | Name |
---|---|
class CodeQualityExtension |
getIgnoreFailures, getReportsDir, getSourceSets, getToolVersion, isIgnoreFailures, setIgnoreFailures, setReportsDir, setSourceSets, setToolVersion |
class groovy.lang.GroovyObjectSupport |
groovy.lang.GroovyObjectSupport#setProperty(java.lang.String, java.lang.Object), groovy.lang.GroovyObjectSupport#getProperty(java.lang.String), groovy.lang.GroovyObjectSupport#invokeMethod(java.lang.String, java.lang.Object), groovy.lang.GroovyObjectSupport#getMetaClass(), groovy.lang.GroovyObjectSupport#setMetaClass(groovy.lang.MetaClass), groovy.lang.GroovyObjectSupport#wait(long, int), groovy.lang.GroovyObjectSupport#wait(long), groovy.lang.GroovyObjectSupport#wait(), groovy.lang.GroovyObjectSupport#equals(java.lang.Object), groovy.lang.GroovyObjectSupport#toString(), groovy.lang.GroovyObjectSupport#hashCode(), groovy.lang.GroovyObjectSupport#getClass(), groovy.lang.GroovyObjectSupport#notify(), groovy.lang.GroovyObjectSupport#notifyAll() |
Whether or not to write PMD results to System.out
.
The rule priority threshold; violations for rules with a lower priority will not be reported. Default value is 5, which means that all violations will be reported. This is equivalent to PMD's Ant task minimumPriority property. See the official documentation for the list of priorities. Example: rulePriority = 3
The custom rule set to be used (if any). Replaces ruleSetFiles
, except that it does not currently support multiple rule sets.
See the official documentation for how to author a rule set.
Example: ruleSetConfig = resources.text.fromFile("config/pmd/myRuleSet.xml")
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/myRuleSet.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, 1.3, 1.4, 1.5, 1.6, 1.7 or jsp
Convenience method for adding rule set files. Example: ruleSetFiles "config/pmd/myRuleSet.xml"
ruleSetFiles
- the rule set files to be addedConvenience method for adding rule sets. Example: ruleSets "basic", "braces"
ruleSets
- the rule sets to be addedSets the rule priority threshold.
Sets the target jdk used with pmd.