aboutsummaryrefslogtreecommitdiffstats
path: root/src/main
diff options
context:
space:
mode:
authorJulien HENRY <julien.henry@sonarsource.com>2016-04-07 19:04:38 +0200
committerJulien HENRY <julien.henry@sonarsource.com>2016-04-07 19:05:41 +0200
commit1d4a8d4d14df3d498bb0ea68feee8ec6a2370856 (patch)
tree73ee5a5eb4d78a19ae224cbf8f6f33ee8f70b66f /src/main
parentfaef791d6369f0301d8fcbee5c255a4a593059f1 (diff)
downloadsonar-scanner-cli-1d4a8d4d14df3d498bb0ea68feee8ec6a2370856.tar.gz
sonar-scanner-cli-1d4a8d4d14df3d498bb0ea68feee8ec6a2370856.zip
SQSCANNER-15 Update Scanner API to 2.6
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/org/sonarsource/scanner/cli/Cli.java4
-rw-r--r--src/main/java/org/sonarsource/scanner/cli/Main.java10
-rw-r--r--src/main/java/org/sonarsource/scanner/cli/ScannerFactory.java (renamed from src/main/java/org/sonarsource/scanner/cli/RunnerFactory.java)12
3 files changed, 13 insertions, 13 deletions
diff --git a/src/main/java/org/sonarsource/scanner/cli/Cli.java b/src/main/java/org/sonarsource/scanner/cli/Cli.java
index f8f1fb8..6544cc2 100644
--- a/src/main/java/org/sonarsource/scanner/cli/Cli.java
+++ b/src/main/java/org/sonarsource/scanner/cli/Cli.java
@@ -20,7 +20,7 @@
package org.sonarsource.scanner.cli;
import java.util.Properties;
-import org.sonar.runner.api.RunnerProperties;
+import org.sonarsource.scanner.api.ScannerProperties;
class Cli {
@@ -63,7 +63,7 @@ class Cli {
for (int i = 0; i < args.length; i++) {
String arg = args[i];
if (i == 0 && arg.charAt(0) != '-') {
- props.setProperty(RunnerProperties.TASK, arg);
+ props.setProperty(ScannerProperties.TASK, arg);
} else if ("-h".equals(arg) || "--help".equals(arg)) {
printUsage();
diff --git a/src/main/java/org/sonarsource/scanner/cli/Main.java b/src/main/java/org/sonarsource/scanner/cli/Main.java
index 7ea4f30..0f6c1eb 100644
--- a/src/main/java/org/sonarsource/scanner/cli/Main.java
+++ b/src/main/java/org/sonarsource/scanner/cli/Main.java
@@ -24,7 +24,7 @@ import java.io.IOException;
import java.io.InputStreamReader;
import java.nio.charset.StandardCharsets;
import java.util.Properties;
-import org.sonar.runner.api.EmbeddedRunner;
+import org.sonarsource.scanner.api.EmbeddedScanner;
/**
* Arguments :
@@ -43,12 +43,12 @@ public class Main {
private final Shutdown shutdown;
private final Cli cli;
private final Conf conf;
- private EmbeddedRunner runner;
+ private EmbeddedScanner runner;
private BufferedReader inputReader;
- private RunnerFactory runnerFactory;
+ private ScannerFactory runnerFactory;
private Logs logger;
- Main(Shutdown shutdown, Cli cli, Conf conf, RunnerFactory runnerFactory, Logs logger) {
+ Main(Shutdown shutdown, Cli cli, Conf conf, ScannerFactory runnerFactory, Logs logger) {
this.shutdown = shutdown;
this.cli = cli;
this.conf = conf;
@@ -62,7 +62,7 @@ public class Main {
Cli cli = new Cli(exit, logs).parse(args);
cli.verify();
Shutdown shutdown = new Shutdown(exit, cli.isInteractive());
- Main main = new Main(shutdown, cli, new Conf(cli, logs), new RunnerFactory(logs), logs);
+ Main main = new Main(shutdown, cli, new Conf(cli, logs), new ScannerFactory(logs), logs);
main.execute();
}
diff --git a/src/main/java/org/sonarsource/scanner/cli/RunnerFactory.java b/src/main/java/org/sonarsource/scanner/cli/ScannerFactory.java
index 4bc1dce..c8144d7 100644
--- a/src/main/java/org/sonarsource/scanner/cli/RunnerFactory.java
+++ b/src/main/java/org/sonarsource/scanner/cli/ScannerFactory.java
@@ -20,19 +20,19 @@
package org.sonarsource.scanner.cli;
import java.util.Properties;
-import org.sonar.runner.api.EmbeddedRunner;
-import org.sonar.runner.api.LogOutput;
+import org.sonarsource.scanner.api.EmbeddedScanner;
+import org.sonarsource.scanner.api.LogOutput;
-class RunnerFactory {
+class ScannerFactory {
private final Logs logger;
- public RunnerFactory(Logs logger) {
+ public ScannerFactory(Logs logger) {
this.logger = logger;
}
- EmbeddedRunner create(Properties props) {
- return EmbeddedRunner.create(new DefaultLogOutput()).addGlobalProperties(props);
+ EmbeddedScanner create(Properties props) {
+ return EmbeddedScanner.create(new DefaultLogOutput()).addGlobalProperties(props);
}
class DefaultLogOutput implements LogOutput {