diff options
author | Duarte Meneses <duarte.meneses@sonarsource.com> | 2016-09-12 17:13:21 +0200 |
---|---|---|
committer | Duarte Meneses <duarte.meneses@sonarsource.com> | 2016-09-13 13:27:18 +0200 |
commit | 516ba9b922f4dab9f72077ee5ebf6eebda6c0d3a (patch) | |
tree | a393440f15a5a956997fff8a8641a7a5ef647aa9 /src/main/java/org/sonarsource/scanner | |
parent | ec22be60678b5ff5138e5ba6d3bba2fe7a5a5fc1 (diff) | |
download | sonar-scanner-cli-516ba9b922f4dab9f72077ee5ebf6eebda6c0d3a.tar.gz sonar-scanner-cli-516ba9b922f4dab9f72077ee5ebf6eebda6c0d3a.zip |
SQSCANNER-28 Support sonar.scanner.skip without connecting to server
Diffstat (limited to 'src/main/java/org/sonarsource/scanner')
-rw-r--r-- | src/main/java/org/sonarsource/scanner/cli/Main.java | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/main/java/org/sonarsource/scanner/cli/Main.java b/src/main/java/org/sonarsource/scanner/cli/Main.java index 9833c85..4c26e90 100644 --- a/src/main/java/org/sonarsource/scanner/cli/Main.java +++ b/src/main/java/org/sonarsource/scanner/cli/Main.java @@ -22,6 +22,7 @@ package org.sonarsource.scanner.cli; import java.io.IOException; import java.util.Properties; import org.sonarsource.scanner.api.EmbeddedScanner; +import org.sonarsource.scanner.api.ScanProperties; /** * Arguments : @@ -65,6 +66,7 @@ public class Main { try { Properties p = conf.properties(); + checkSkip(p); configureLogging(p); init(p); runner.start(); @@ -79,6 +81,13 @@ public class Main { runner.stop(); exit.exit(Exit.SUCCESS); } + + private void checkSkip(Properties properties) { + if ("true".equalsIgnoreCase(properties.getProperty(ScanProperties.SKIP))) { + logger.info("SonarQube Scanner analysis skipped"); + exit.exit(Exit.SUCCESS); + } + } private void init(Properties p) throws IOException { SystemInfo.print(logger); |