Package | Description |
---|---|
net.sourceforge.pmd |
This is the PMD programming mistake detector.
|
net.sourceforge.pmd.lang.rule | |
net.sourceforge.pmd.lang.rule.stat | |
net.sourceforge.pmd.lang.rule.xpath | |
net.sourceforge.pmd.processor |
Modifier and Type | Method and Description |
---|---|
static RuleContext |
PMD.newRuleContext(java.lang.String sourceCodeFilename,
java.io.File sourceCodeFile)
Creates a new rule context, initialized with a new, empty report.
|
Modifier and Type | Method and Description |
---|---|
void |
RuleSet.apply(java.util.List<? extends Node> acuList,
RuleContext ctx)
Executes the rules in this ruleset against each of the given nodes.
|
void |
Rule.apply(java.util.List<? extends Node> nodes,
RuleContext ctx)
Apply this rule to the given collection of nodes, using the given
context.
|
void |
RuleSets.apply(java.util.List<Node> acuList,
RuleContext ctx,
Language language)
Apply all applicable rules to the compilation units.
|
void |
RuleChain.apply(java.util.List<Node> nodes,
RuleContext ctx,
Language language)
Apply the RuleChain to the given Nodes using the given RuleContext, for
those rules using the given Language.
|
static Report |
Report.createReport(RuleContext ctx,
java.lang.String fileName)
Creates a new, initialized, empty report for the given file name.
|
void |
RuleSets.end(RuleContext ctx)
Notify all rules of the end of processing.
|
void |
RuleSet.end(RuleContext ctx)
Triggers the end lifecycle event on each rule in the ruleset.
|
void |
Rule.end(RuleContext ctx)
End processing.
|
static void |
PMD.processFiles(PMDConfiguration configuration,
RuleSetFactory ruleSetFactory,
java.util.List<DataSource> files,
RuleContext ctx,
java.util.List<Renderer> renderers)
Run PMD on a list of files using multiple threads - if more than one is
available
|
void |
SourceCodeProcessor.processSourceCode(java.io.InputStream sourceCode,
RuleSets ruleSets,
RuleContext ctx)
Processes the input stream against a rule set using the given input
encoding.
|
void |
SourceCodeProcessor.processSourceCode(java.io.Reader sourceCode,
RuleSets ruleSets,
RuleContext ctx)
Processes the input stream against a rule set using the given input
encoding.
|
void |
RuleSets.start(RuleContext ctx)
Notify all rules of the start of processing.
|
void |
RuleSet.start(RuleContext ctx)
Triggers that start lifecycle event on each rule in this ruleset.
|
void |
Rule.start(RuleContext ctx)
Start processing.
|
Constructor and Description |
---|
RuleContext(RuleContext ruleContext)
Constructor which shares attributes and report listeners with the given
RuleContext.
|
Modifier and Type | Method and Description |
---|---|
void |
RuleViolationFactory.addViolation(RuleContext ruleContext,
Rule rule,
Node node,
java.lang.String message,
int beginLine,
int endLine,
java.lang.Object[] args) |
void |
AbstractRuleViolationFactory.addViolation(RuleContext ruleContext,
Rule rule,
Node node,
java.lang.String message,
int beginLine,
int endLine,
java.lang.Object[] args) |
void |
RuleViolationFactory.addViolation(RuleContext ruleContext,
Rule rule,
Node node,
java.lang.String message,
java.lang.Object[] args)
Adds a violation to the report.
|
void |
AbstractRuleViolationFactory.addViolation(RuleContext ruleContext,
Rule rule,
Node node,
java.lang.String message,
java.lang.Object[] args) |
void |
XPathRule.apply(java.util.List<? extends Node> nodes,
RuleContext ctx)
Apply the rule to all nodes.
|
void |
MockRule.apply(java.util.List<? extends Node> nodes,
RuleContext ctx) |
void |
AbstractDelegateRule.apply(java.util.List<? extends Node> nodes,
RuleContext ctx) |
protected abstract RuleViolation |
AbstractRuleViolationFactory.createRuleViolation(Rule rule,
RuleContext ruleContext,
Node node,
java.lang.String message) |
protected abstract RuleViolation |
AbstractRuleViolationFactory.createRuleViolation(Rule rule,
RuleContext ruleContext,
Node node,
java.lang.String message,
int beginLine,
int endLine) |
void |
AbstractRule.end(RuleContext ctx) |
void |
AbstractDelegateRule.end(RuleContext ctx) |
void |
XPathRule.evaluate(Node node,
RuleContext data)
Evaluate the XPath query with the AST node.
|
protected abstract void |
AbstractRuleChainVisitor.indexNodes(java.util.List<Node> nodes,
RuleContext ctx)
Index all nodes for visitation by rules.
|
void |
AbstractRule.start(RuleContext ctx) |
void |
AbstractDelegateRule.start(RuleContext ctx) |
protected abstract void |
AbstractRuleChainVisitor.visit(Rule rule,
Node node,
RuleContext ctx)
Visit the given rule to the given node.
|
void |
RuleChainVisitor.visitAll(java.util.List<Node> nodes,
RuleContext ctx)
Visit all the given Nodes provided using the given RuleContext.
|
void |
AbstractRuleChainVisitor.visitAll(java.util.List<Node> nodes,
RuleContext ctx) |
Constructor and Description |
---|
ParametricRuleViolation(Rule theRule,
RuleContext ctx,
T node,
java.lang.String message) |
Modifier and Type | Method and Description |
---|---|
void |
StatisticalRuleHelper.apply(RuleContext ctx) |
Modifier and Type | Method and Description |
---|---|
java.util.List<Node> |
XPathRuleQuery.evaluate(Node node,
RuleContext data)
Evaluate the XPath query against the given Node.
|
java.util.List<Node> |
SaxonXPathRuleQuery.evaluate(Node node,
RuleContext data)
Evaluate the XPath query against the given Node.
|
java.util.List<Node> |
JaxenXPathRuleQuery.evaluate(Node node,
RuleContext data)
Evaluate the XPath query against the given Node.
|
abstract java.util.List<Node> |
AbstractXPathRuleQuery.evaluate(Node node,
RuleContext data)
Evaluate the XPath query against the given Node.
|
Modifier and Type | Method and Description |
---|---|
void |
AbstractPMDProcessor.processFiles(RuleSetFactory ruleSetFactory,
java.util.List<DataSource> files,
RuleContext ctx,
java.util.List<Renderer> renderers) |
Constructor and Description |
---|
PmdRunnable(DataSource dataSource,
java.lang.String fileName,
java.util.List<Renderer> renderers,
RuleContext ruleContext,
RuleSets ruleSets,
SourceCodeProcessor sourceCodeProcessor) |
Copyright © 2002–2018 PMD. All rights reserved.