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

Unified Diff: tool/doc.dart

Issue 1477863002: Fix doc index generation to include `error` rules. (Closed) Base URL: https://github.com/dart-lang/linter.git@master
Patch Set: 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tool/doc.dart
diff --git a/tool/doc.dart b/tool/doc.dart
index d1064626e96663d6ae9e663a804d876ae73fbc46..8ef786f1b1520600e72276349d6e2531a52dfdb9 100644
--- a/tool/doc.dart
+++ b/tool/doc.dart
@@ -55,8 +55,8 @@ const ruleLeadMatter = 'Rules are organized into familiar rule groups.';
final List<LintRule> rules =
new List<LintRule>.from(ruleRegistry, growable: false)..sort();
-String get enumeratePubRules => rules
- .where((r) => r.group == Group.pub)
+String get enumerateErrorRules => rules
+ .where((r) => r.group == Group.errors)
.map((r) => '${toDescription(r)}')
.join('\n\n');
@@ -65,6 +65,11 @@ String get enumerateGroups => Group.builtin
'<li><strong>${g.name}</strong> - ${markdownToHtml(g.description)}</li>')
.join('\n');
+String get enumeratePubRules => rules
+ .where((r) => r.group == Group.pub)
+ .map((r) => '${toDescription(r)}')
+ .join('\n\n');
+
String get enumerateStyleRules => rules
.where((r) => r.group == Group.style)
.map((r) => '${toDescription(r)}')
@@ -212,6 +217,10 @@ class Indexer {
${markdownToHtml(ruleFootMatter)}
</p>
+ <h2 id="styleguide-rules">Error Rules</h2>
+
+ $enumerateErrorRules
+
<h2 id="styleguide-rules">Style Rules</h2>
$enumerateStyleRules
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698