public class PmdExtension extends CodeQualityExtension
PmdPlugin
Constructor | Description |
---|---|
PmdExtension(Project project) |
Modifier and Type | Method | Description |
---|---|---|
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.
|
java.util.List<java.lang.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() |
Whether or not to write PMD results to
System.out . |
void |
ruleSetFiles(java.lang.Object... ruleSetFiles) |
Convenience method for adding rule set files.
|
void |
ruleSets(java.lang.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(java.util.List<java.lang.String> ruleSets) |
|
void |
setTargetJdk(java.lang.Object value) |
Sets the target jdk used with pmd.
|
getReportsDir, getSourceSets, getToolVersion, isIgnoreFailures, setIgnoreFailures, setReportsDir, setSourceSets, setToolVersion
public PmdExtension(Project project)
public java.util.List<java.lang.String> getRuleSets()
public void setRuleSets(java.util.List<java.lang.String> ruleSets)
public void ruleSets(java.lang.String... ruleSets)
ruleSets
- the rule sets to be addedpublic TargetJdk getTargetJdk()
public void setTargetJdk(java.lang.Object value)
@Incubating public int getRulePriority()
@Incubating public void setRulePriority(int intValue)
@Incubating public TextResource getRuleSetConfig()
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")@Incubating public void setRuleSetConfig(TextResource ruleSetConfig)
public FileCollection getRuleSetFiles()
public void setRuleSetFiles(FileCollection ruleSetFiles)
public void ruleSetFiles(java.lang.Object... ruleSetFiles)
ruleSetFiles
- the rule set files to be added@Incubating public boolean isConsoleOutput()
System.out
.@Incubating public void setConsoleOutput(boolean consoleOutput)