public class PmdExtension extends CodeQualityExtension
PmdPlugin
Constructor and Description |
---|
PmdExtension(Project project) |
Modifier and Type | Method and 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.
|
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()
Whether or not to write PMD results to
System.out . |
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.
|
getReportsDir, getSourceSets, getToolVersion, isIgnoreFailures, setIgnoreFailures, setReportsDir, setSourceSets, setToolVersion
public PmdExtension(Project project)
public List<String> getRuleSets()
public void ruleSets(String... ruleSets)
ruleSets
- the rule sets to be addedpublic TargetJdk getTargetJdk()
public void setTargetJdk(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(Object... ruleSetFiles)
ruleSetFiles
- the rule set files to be added@Incubating public boolean isConsoleOutput()
System.out
.@Incubating public void setConsoleOutput(boolean consoleOutput)