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

Unified Diff: compiler/java/com/google/dart/compiler/CommandLineOptions.java

Issue 12438007: Updates to the new analyzer to help make the try bot happy. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 9 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: compiler/java/com/google/dart/compiler/CommandLineOptions.java
===================================================================
--- compiler/java/com/google/dart/compiler/CommandLineOptions.java (revision 19891)
+++ compiler/java/com/google/dart/compiler/CommandLineOptions.java (working copy)
@@ -36,6 +36,10 @@
usage = "Format errors as normal or machine")
private String errorFormat = "";
+ @Option(name = "--machine", //
+ usage = "Print errors in a format suitable for parsing")
+ private boolean machineFormat = false;
+
@Option(name = "--extended-exit-code",
usage = "0 - clean; 1 - has warnings; 2 - has errors")
private boolean extendedExitCode = false;
@@ -262,10 +266,16 @@
* @return the format to use for printing errors
*/
public ErrorFormat printErrorFormat() {
+ if (machineFormat) {
+ return ErrorFormat.MACHINE;
+ }
+
String lowerError = errorFormat.toLowerCase();
+
if ("machine".equals(lowerError)) {
return ErrorFormat.MACHINE;
}
+
return ErrorFormat.NORMAL;
}
}

Powered by Google App Engine
This is Rietveld 408576698