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

Unified Diff: pkg/intl/test/message_extraction/extract_to_json.dart

Issue 22392004: Improvements to warnings on message extraction. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Changes from review Created 7 years, 4 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
« no previous file with comments | « pkg/intl/lib/extract_messages.dart ('k') | pkg/intl/test/message_extraction/failed_extraction_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/intl/test/message_extraction/extract_to_json.dart
diff --git a/pkg/intl/test/message_extraction/extract_to_json.dart b/pkg/intl/test/message_extraction/extract_to_json.dart
index 4c1d71829eb3482d3341289c7d82275ec08259c3..9720506eff40780935541e1673fb37e3eb175047 100644
--- a/pkg/intl/test/message_extraction/extract_to_json.dart
+++ b/pkg/intl/test/message_extraction/extract_to_json.dart
@@ -33,6 +33,8 @@ main() {
var parser = new ArgParser();
parser.addFlag("suppress-warnings", defaultsTo: false,
callback: (x) => suppressWarnings = x);
+ parser.addFlag("warnings-are-errors", defaultsTo: false,
+ callback: (x) => warningsAreErrors = x);
parser.addOption("output-dir", defaultsTo: '.',
callback: (value) => targetDir = value);
@@ -49,6 +51,9 @@ main() {
}
var file = new File(path.join(targetDir, 'intl_messages.json'));
file.writeAsStringSync(json.stringify(allMessages));
+ if (hasWarnings && warningsAreErrors) {
+ exit(1);
+ }
}
/**
« no previous file with comments | « pkg/intl/lib/extract_messages.dart ('k') | pkg/intl/test/message_extraction/failed_extraction_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698