diff options
author | Duarte Meneses <duarte.meneses@sonarsource.com> | 2016-09-15 16:24:36 +0200 |
---|---|---|
committer | Duarte Meneses <duarte.meneses@sonarsource.com> | 2016-09-16 13:36:49 +0200 |
commit | 1d6a79e5221587c98f451b233b99eeea7d66f4d7 (patch) | |
tree | 6b7c5260bd14d3bcce06cc7fdc44eedd18d9caf5 /src/main/java/org/sonarsource/scanner/cli/Cli.java | |
parent | 12c373fad66da9ccb9cfb2ce7e3c5d2de4f60fe2 (diff) | |
download | sonar-scanner-cli-1d6a79e5221587c98f451b233b99eeea7d66f4d7.tar.gz sonar-scanner-cli-1d6a79e5221587c98f451b233b99eeea7d66f4d7.zip |
SQSCANNER-23 Support the new 'MessageException' unchecked exception and log by default the error stack trace only when a non-MessageException is thrown
Diffstat (limited to 'src/main/java/org/sonarsource/scanner/cli/Cli.java')
-rw-r--r-- | src/main/java/org/sonarsource/scanner/cli/Cli.java | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/src/main/java/org/sonarsource/scanner/cli/Cli.java b/src/main/java/org/sonarsource/scanner/cli/Cli.java index 784f6c1..cdada21 100644 --- a/src/main/java/org/sonarsource/scanner/cli/Cli.java +++ b/src/main/java/org/sonarsource/scanner/cli/Cli.java @@ -26,7 +26,6 @@ class Cli { private boolean debugEnabled = false; private boolean displayVersionOnly = false; - private boolean displayStackTrace = false; private final Properties props = new Properties(); private final Exit exit; private final Logs logger; @@ -44,10 +43,6 @@ class Cli { return displayVersionOnly; } - boolean isDisplayStackTrace() { - return displayStackTrace; - } - Properties properties() { return props; } @@ -66,10 +61,9 @@ class Cli { } else if ("-v".equals(arg) || "--version".equals(arg)) { displayVersionOnly = true; - + } else if ("-e".equals(arg) || "--errors".equals(arg)) { - displayStackTrace = true; - logger.setDisplayStackTrace(true); + logger.info("Option -e/--errors is no longer supported and will be ignored"); } else if ("-X".equals(arg) || "--debug".equals(arg)) { props.setProperty("sonar.verbose", "true"); @@ -100,7 +94,6 @@ class Cli { private void reset() { props.clear(); debugEnabled = false; - displayStackTrace = false; displayVersionOnly = false; } @@ -130,7 +123,6 @@ class Cli { logger.info(""); logger.info("Options:"); logger.info(" -D,--define <arg> Define property"); - logger.info(" -e,--errors Produce execution error messages"); logger.info(" -h,--help Display help information"); logger.info(" -v,--version Display version information"); logger.info(" -X,--debug Produce execution debug output"); |