Make fail on violation negatable

- Instead of doing `--fail-on-violation false` we now do `--no-fail-on-violation`
    or `--fail-on-violation` to be explicit about the default
This commit is contained in:
Juan Martín Sotuyo Dodero
2022-08-22 18:27:44 -03:00
parent 3230038bc2
commit 78d046c7d1

View File

@@ -39,10 +39,10 @@ public abstract class AbstractAnalysisPmdSubcommand extends AbstractPmdSubcomman
+ "One of --dir, --file-list or --uri must be provided.")
protected URI uri;
@Option(names = "--fail-on-violation",
@Option(names = "--no-fail-on-violation",
description = "By default PMD exits with status 4 if violations are found. "
+ "Disable this option with '--fail-on-violation false' to exit with 0 instead and just write the report.",
defaultValue = "true", arity = "1")
+ "Disable this option with '--no-fail-on-violation' to exit with 0 instead and just write the report.",
defaultValue = "true", negatable = true)
protected boolean failOnViolation;
@Override