Affects PMD version: 6.3.0
The -min CLI option (rule priority threshold) takes an integer argument between 1 and 5. However, JCommander assumes it's an enum and displays the following help:
-minimumpriority, -min
Rule priority threshold; rules with lower priority than configured here
won't be used. Default is '5' which is the lowest priority.
Default: Low
Possible Values: [High, Medium High, Medium, Medium Low, Low]
Using the name of an enum constant makes the parameter parsing fail:
https://github.com/pmd/pmd/blob/master/pmd-core/src/main/java/net/sourceforge/pmd/cli/PMDParameters.java#L132
Should we allow mentioning the names of the constants? Or just fix the JCommander help?
For some reason, only -min 4 and -min 5 work as expected (at least on my machine). Using eg -min 3 makes PMD fail with
GRAVE: No rules found. Maybe you mispelled a rule name? (/home/clifrr/Bureau/import_sample/rset.xml)
Affects PMD version: 6.3.0
The
-minCLI option (rule priority threshold) takes an integer argument between 1 and 5. However, JCommander assumes it's an enum and displays the following help:Using the name of an enum constant makes the parameter parsing fail:
https://github.com/pmd/pmd/blob/master/pmd-core/src/main/java/net/sourceforge/pmd/cli/PMDParameters.java#L132
Should we allow mentioning the names of the constants? Or just fix the JCommander help?
For some reason, only
-min 4and-min 5work as expected (at least on my machine). Using eg-min 3makes PMD fail with