fix one minor issue related to 'version'
This commit is contained in:
@ -98,7 +98,7 @@ public class PMDParameters {
|
||||
@Parameter(names = { "--use-version", "-version", "-v" }, description = "Specify version of a language PMD should use.")
|
||||
private String version = null;
|
||||
|
||||
@Parameter(names = "--version", description = "Display current version of PMD.")
|
||||
@Parameter(names = "--version", description = "Display current version of PMD.", help = true)
|
||||
private boolean currentVersion = false;
|
||||
|
||||
@Parameter(names = { "--language", "-language", "-l" }, description = "Specify a language PMD should use.")
|
||||
|
@ -41,7 +41,7 @@ public final class PmdParametersParseResult {
|
||||
* In this case no configuration is produced.
|
||||
*/
|
||||
public boolean isHelp() {
|
||||
return !isError() && result.isHelp();
|
||||
return !isError() && result.isHelp() && !result.isVersion();
|
||||
}
|
||||
|
||||
/**
|
||||
@ -49,7 +49,7 @@ public final class PmdParametersParseResult {
|
||||
* In this case no configuration is produced.
|
||||
*/
|
||||
public boolean isVersion() {
|
||||
return result.isVersion();
|
||||
return !isError() && result.isHelp() && result.isVersion();
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user