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

Unified Diff: tool/rule.dart

Issue 1415183009: Adds check for `AsExpression`s (Fix #145). (Closed) Base URL: https://github.com/dart-lang/linter.git@master
Patch Set: reorg Created 5 years, 1 month 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 | « test/rules/avoid_as.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tool/rule.dart
diff --git a/tool/rule.dart b/tool/rule.dart
index f309fa08fe326de90d6bfd1fa27600708b8e916b..09bbb82a090912122d8ef6a1c2dbf3c2529a24a9 100644
--- a/tool/rule.dart
+++ b/tool/rule.dart
@@ -64,11 +64,14 @@ void main([args]) {
return;
}
- // Generate rule stub
+ // Generate rule stub.
generateStub(libName, outDir: outDir);
- // Generate test stub
+ // Generate test stub.
generateTest(libName, outDir: outDir);
+
+ // Update rule registry.
+ updateRuleRegistry(libName);
}
void printUsage(ArgParser parser, [String error]) {
@@ -136,8 +139,14 @@ String _generateTest(String libName, String className) => '''
// 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.
+// test w/ `dart test/util/solo_test.dart $libName`
+
''';
-void addToRuleIndex(String libName, String className) {
+void updateRuleRegistry(String libName) {
//TODO: find right place to insert into imports and ruleMap
+ print("Don't forget to update lib/rules.dart with a line like:");
+ print(" ..register(new ${toClassName(libName)}())");
+ print("Then run your test like so:");
+ print(" dart test/util/solo_test.dart $libName");
}
« no previous file with comments | « test/rules/avoid_as.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698