Resolve #180 - refactor pmd processors

- SourceCodeProcessor now consistently calls rule sets start / end
    if cache is not up to date
 - Both Mono and MultiThread Processors rely on PmdRunnable, just using
    different execution strategies
 - This also fixes https://sourceforge.net/p/pmd/bugs/1511/
This commit is contained in:
Juan Martín Sotuyo Dodero
2017-01-13 20:24:20 -03:00
committed by Andreas Dangel
parent c4ce057709
commit 3caa71b94b
8 changed files with 194 additions and 285 deletions

View File

@@ -216,9 +216,7 @@ public abstract class RuleTst {
ctx.setIgnoreExceptions(false);
RuleSet rules = new RuleSet();
rules.addRule(rule);
rules.start(ctx);
p.getSourceCodeProcessor().processSourceCode(new StringReader(code), new RuleSets(rules), ctx);
rules.end(ctx);
} catch (Exception e) {
throw new RuntimeException(e);
}