@@ -125,7 +125,7 @@ public final class Main { | |||
printUsage(); | |||
} else if ("-X".equals(arg) || "--debug".equals(arg)) { | |||
props.setProperty(Runner.DEBUG_MODE, "true"); | |||
props.setProperty(Runner.VERBOSE, "true"); | |||
} else if ("-D".equals(arg) || "--define".equals(arg)) { | |||
i++; |
@@ -37,7 +37,12 @@ import java.util.Properties; | |||
* @since 1.1 | |||
*/ | |||
public final class Runner { | |||
/** | |||
* @deprecated Replaced by sonar.verbose since 1.2 | |||
*/ | |||
@Deprecated | |||
public static final String DEBUG_MODE = "runner.debug"; | |||
private static final String VERBOSE = "sonar.verbose"; | |||
private File projectDir; | |||
private File workDir; | |||
@@ -90,7 +95,7 @@ public final class Runner { | |||
} | |||
public boolean isDebug() { | |||
return Boolean.parseBoolean(properties.getProperty(DEBUG_MODE, "false")); | |||
return Boolean.parseBoolean(properties.getProperty(VERBOSE, properties.getProperty(DEBUG_MODE, "false"))); | |||
} | |||
public String getRunnerVersion() { |
@@ -48,13 +48,13 @@ public class MainTest { | |||
@Test | |||
public void shouldEnableDebugMode() { | |||
Properties props = Main.parseArguments(new String[]{"-X"}); | |||
assertThat(props.getProperty(Runner.DEBUG_MODE), is("true")); | |||
assertThat(props.getProperty(Runner.VERBOSE), is("true")); | |||
} | |||
@Test | |||
public void shouldDisableDebugModeByDefault() { | |||
Properties props = Main.parseArguments(new String[]{}); | |||
assertThat(props.getProperty(Runner.DEBUG_MODE), nullValue()); | |||
assertThat(props.getProperty(Runner.VERBOSE), nullValue()); | |||
} | |||
@Test |