Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4)

Unified Diff: editor/tools/plugins/com.google.dart.command.analyze/src/com/google/dart/command/analyze/AnalyzerMain.java

Issue 16231008: Remove unused (and little used) cli flags from dartanalyzer. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: editor/tools/plugins/com.google.dart.command.analyze/src/com/google/dart/command/analyze/AnalyzerMain.java
===================================================================
--- editor/tools/plugins/com.google.dart.command.analyze/src/com/google/dart/command/analyze/AnalyzerMain.java (revision 23440)
+++ editor/tools/plugins/com.google.dart.command.analyze/src/com/google/dart/command/analyze/AnalyzerMain.java (working copy)
@@ -22,8 +22,6 @@
import java.io.File;
import java.io.IOException;
import java.io.PrintStream;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.List;
@@ -57,6 +55,7 @@
showVersion(options, System.out);
System.out.println();
showUsage(System.out);
+ System.out.println("For more information, see http://www.dartlang.org/tools/analyzer.");
System.exit(0);
}
@@ -77,20 +76,6 @@
System.exit(1);
}
- if (options.getSdkIndexLocation() != null) {
- AnalyzerImpl analyzer = new AnalyzerImpl(options);
- if (analyzer.createSdkIndex()) {
- System.exit(0);
- } else {
- System.exit(1);
- }
- }
-
- if (options.getRunTests()) {
- runTests(options);
- System.exit(0);
- }
-
try {
if (options.shouldBatch()) {
@@ -190,49 +175,6 @@
return status;
}
- /**
- * If the unit tests are on our classpath, run them and exit with an appropriate status code
- *
- * @param options
- */
- private static void runTests(AnalyzerOptions options) {
- // org.junit.runner.JUnitCore.main("com.google.dart.command.analyze.CombinedEngineTestSuite");
-
- try {
- // Load the main test suite using Class.forName(). This lets any jar minimization tools in the
- // build pipeline know that this class is referenced by reflection.
- Class.forName("com.google.dart.command.analyze.CombinedEngineTestSuite");
-
- Class<?> junitRunner = Class.forName("org.junit.runner.JUnitCore");
-
- Method mainMethod = junitRunner.getMethod("main", String[].class);
-
- System.setProperty("com.google.dart.sdk", options.getDartSdkPath().toString());
-
- Object mainArgs = new String[] {"com.google.dart.command.analyze.CombinedEngineTestSuite"};
-
- mainMethod.invoke(null, mainArgs);
- } catch (ClassNotFoundException ex) {
- System.out.println("Test classes not available in this build.");
- System.exit(1);
- } catch (SecurityException e) {
- System.out.println("Test classes not available in this build.");
- System.exit(1);
- } catch (NoSuchMethodException e) {
- System.out.println("Test classes not available in this build.");
- System.exit(1);
- } catch (IllegalArgumentException e) {
- e.printStackTrace();
- System.exit(1);
- } catch (IllegalAccessException e) {
- e.printStackTrace();
- System.exit(1);
- } catch (InvocationTargetException e) {
- e.printStackTrace();
- System.exit(1);
- }
- }
-
private static void showUsage(PrintStream out) {
out.println("Usage: " + PROGRAM_NAME + " [<options>] <dart-script>");
out.println();

Powered by Google App Engine
This is Rietveld 408576698