Add '-no-cache' CLI switch, to disable incremental analysis

- The switch discards the argument provided to '-cache' if any
- Using the switch disables the suggestion to use incremental analysis
- Rule tests use that option to avoid the warning, which clutters build logs
- Refs #946
This commit is contained in:
Clément Fournier
2018-03-05 13:47:48 +01:00
parent dc4f6b180b
commit e2c6f1e467
7 changed files with 110 additions and 18 deletions

View File

@@ -260,6 +260,7 @@ public abstract class RuleTst {
try {
PMD p = new PMD();
p.getConfiguration().setDefaultLanguageVersion(languageVersion);
p.getConfiguration().setIgnoreIncrementalAnalysis(true);
if (isUseAuxClasspath) {
// configure the "auxclasspath" option for unit testing
p.getConfiguration().prependClasspath(".");