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

Side by Side Diff: pkg/compiler/lib/src/dart2js.dart

Issue 1077373003: Add fatal-warnings flag, that turns warnings into compilation errors (the name (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « pkg/compiler/lib/src/compiler.dart ('k') | no next file » | 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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 dart2js.cmdline; 5 library dart2js.cmdline;
6 6
7 import 'dart:async' 7 import 'dart:async'
8 show Future, EventSink; 8 show Future, EventSink;
9 import 'dart:convert' show UTF8, LineSplitter; 9 import 'dart:convert' show UTF8, LineSplitter;
10 import 'dart:io' 10 import 'dart:io'
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after
289 } 289 }
290 290
291 List<String> arguments = <String>[]; 291 List<String> arguments = <String>[];
292 List<OptionHandler> handlers = <OptionHandler>[ 292 List<OptionHandler> handlers = <OptionHandler>[
293 new OptionHandler('-[chvm?]+', handleShortOptions), 293 new OptionHandler('-[chvm?]+', handleShortOptions),
294 new OptionHandler('--throw-on-error(?:=[0-9]+)?', handleThrowOnError), 294 new OptionHandler('--throw-on-error(?:=[0-9]+)?', handleThrowOnError),
295 new OptionHandler('--suppress-warnings', (_) { 295 new OptionHandler('--suppress-warnings', (_) {
296 diagnosticHandler.showWarnings = false; 296 diagnosticHandler.showWarnings = false;
297 passThrough('--suppress-warnings'); 297 passThrough('--suppress-warnings');
298 }), 298 }),
299 new OptionHandler('--fatal-warnings', passThrough),
299 new OptionHandler('--suppress-hints', 300 new OptionHandler('--suppress-hints',
300 (_) => diagnosticHandler.showHints = false), 301 (_) => diagnosticHandler.showHints = false),
301 new OptionHandler( 302 new OptionHandler(
302 '--output-type=dart|--output-type=dart-multi|--output-type=js', 303 '--output-type=dart|--output-type=dart-multi|--output-type=js',
303 setOutputType), 304 setOutputType),
304 new OptionHandler('--verbose', setVerbose), 305 new OptionHandler('--verbose', setVerbose),
305 new OptionHandler('--version', (_) => wantVersion = true), 306 new OptionHandler('--version', (_) => wantVersion = true),
306 new OptionHandler('--library-root=.+', setLibraryRoot), 307 new OptionHandler('--library-root=.+', setLibraryRoot),
307 new OptionHandler('--out=.+|-o.*', setOutput, multipleArguments: true), 308 new OptionHandler('--out=.+|-o.*', setOutput, multipleArguments: true),
308 new OptionHandler('--allow-mock-compilation', passThrough), 309 new OptionHandler('--allow-mock-compilation', passThrough),
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after
555 --analyze-only 556 --analyze-only
556 Analyze but do not generate code. 557 Analyze but do not generate code.
557 558
558 --analyze-signatures-only 559 --analyze-signatures-only
559 Skip analysis of method bodies and field initializers. This option implies 560 Skip analysis of method bodies and field initializers. This option implies
560 --analyze-only. 561 --analyze-only.
561 562
562 --suppress-warnings 563 --suppress-warnings
563 Do not display any warnings. 564 Do not display any warnings.
564 565
566 --fatal-warnings
567 Treat warnings as fatal errors.
karlklose 2015/04/14 06:16:27 Change 'fatal errors' -> 'compilation errors'?
Siggi Cherem (dart-lang) 2015/04/14 21:02:59 Done.
568
565 --suppress-hints 569 --suppress-hints
566 Do not display any hints. 570 Do not display any hints.
567 571
568 --enable-diagnostic-colors 572 --enable-diagnostic-colors
569 Add colors to diagnostic messages. 573 Add colors to diagnostic messages.
570 574
571 --terse 575 --terse
572 Emit diagnostics without suggestions for how to get rid of the diagnosed 576 Emit diagnostics without suggestions for how to get rid of the diagnosed
573 problems. 577 problems.
574 578
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
733 } else if (exitCode == 253) { 737 } else if (exitCode == 253) {
734 print(">>> TEST CRASH"); 738 print(">>> TEST CRASH");
735 } else { 739 } else {
736 print(">>> TEST FAIL"); 740 print(">>> TEST FAIL");
737 } 741 }
738 stderr.writeln(">>> EOF STDERR"); 742 stderr.writeln(">>> EOF STDERR");
739 subscription.resume(); 743 subscription.resume();
740 }); 744 });
741 }); 745 });
742 } 746 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/compiler.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698