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

Side by Side Diff: pkg/front_end/lib/src/fasta/compiler_command_line.dart

Issue 2706053002: Implement --fatal=errors. (Closed)
Patch Set: Address comments. Created 3 years, 10 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 unified diff | Download patch
« no previous file with comments | « no previous file | pkg/front_end/lib/src/fasta/errors.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library fasta.compiler_command_line; 5 library fasta.compiler_command_line;
6 6
7 import 'dart:io' show 7 import 'dart:io' show
8 exit; 8 exit;
9 9
10 import 'command_line.dart' show 10 import 'command_line.dart' show
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 Uri get platform { 67 Uri get platform {
68 return options.containsKey("--compile-sdk") 68 return options.containsKey("--compile-sdk")
69 ? null 69 ? null
70 : options["--platform"] ?? Uri.base.resolve("platform.dill"); 70 : options["--platform"] ?? Uri.base.resolve("platform.dill");
71 } 71 }
72 72
73 Set<String> get fatal { 73 Set<String> get fatal {
74 return new Set<String>.from(options["--fatal"] ?? <String>[]); 74 return new Set<String>.from(options["--fatal"] ?? <String>[]);
75 } 75 }
76 76
77 bool get areErrorsFatal => fatal.contains("errors"); 77 bool get errorsAreFatal => fatal.contains("errors");
78 78
79 bool get areWarningsFatal => fatal.contains("warnings"); 79 bool get warningsAreFatal => fatal.contains("warnings");
80 80
81 bool get areNitsFatal => fatal.contains("nits"); 81 bool get nitsAreFatal => fatal.contains("nits");
82 82
83 static dynamic withGlobalOptions(String programName, List<String> arguments, 83 static dynamic withGlobalOptions(String programName, List<String> arguments,
84 dynamic f(CompilerContext context)) { 84 dynamic f(CompilerContext context)) {
85 return CompilerContext.withGlobalOptions( 85 return CompilerContext.withGlobalOptions(
86 new CompilerCommandLine(programName, arguments), f); 86 new CompilerCommandLine(programName, arguments), f);
87 } 87 }
88 88
89 static CompilerCommandLine forRootContext() { 89 static CompilerCommandLine forRootContext() {
90 return new CompilerCommandLine("", [""]); 90 return new CompilerCommandLine("", [""]);
91 } 91 }
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 Compile the SDK from scratch instead of reading it from 'platform.dill'. 166 Compile the SDK from scratch instead of reading it from 'platform.dill'.
167 167
168 --fatal=errors 168 --fatal=errors
169 --fatal=warnings 169 --fatal=warnings
170 --fatal=nits 170 --fatal=nits
171 Makes messages of the given kinds fatal, that is, immediately stop the 171 Makes messages of the given kinds fatal, that is, immediately stop the
172 compiler with a non-zero exit-code. In --verbose mode, also display an 172 compiler with a non-zero exit-code. In --verbose mode, also display an
173 internal stack trace from the compiler. Multiple kinds can be separated by 173 internal stack trace from the compiler. Multiple kinds can be separated by
174 commas, for example, --fatal=errors,warnings. 174 commas, for example, --fatal=errors,warnings.
175 """; 175 """;
OLDNEW
« no previous file with comments | « no previous file | pkg/front_end/lib/src/fasta/errors.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698