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

Unified Diff: tools/migration/bin/check_for_splits.dart

Issue 2993043002: Split language_2.status into multiple files. (Closed)
Patch Set: Created 3 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
Index: tools/migration/bin/check_for_splits.dart
diff --git a/tools/migration/bin/check_for_splits.dart b/tools/migration/bin/check_for_splits.dart
new file mode 100644
index 0000000000000000000000000000000000000000..d6f627a490460d9bc4b2b6575de6c3c0b944f1a9
--- /dev/null
+++ b/tools/migration/bin/check_for_splits.dart
@@ -0,0 +1,26 @@
+// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:status_file/status_file.dart';
+
+import 'package:migration/src/fork.dart';
+import 'package:migration/src/io.dart';
+import 'package:migration/src/log.dart';
+import 'package:migration/src/migrate_statuses.dart';
+
+const simpleDirs = const ["corelib", "language", "lib"];
+
+void main(List<String> arguments) {
bkonyi 2017/08/04 17:49:01 What's the point of this tool here exactly?
Bob Nystrom 2017/08/04 18:31:44 Oops, that was a temp script for me. Didn't mean t
+ for (var path in listFiles("language_2", extension: ".status")) {
+ var file = new StatusFile.read(path);
+ print(path);
+ for (var section in file.sections) {
+ var splits = filesForHeader(section.condition.toString());
+ if (splits.length > 1) {
+ print("${section.lineNumber}: [ ${section.condition} ]");
+ print(" " + splits.join(" "));
+ }
+ }
+ }
+}

Powered by Google App Engine
This is Rietveld 408576698