Skip to content
This repository was archived by the owner on Nov 20, 2024. It is now read-only.

Commit 45829a6

Browse files
committed
Fix doc index generation to include error rules.
[email protected] Review URL: https://codereview.chromium.org//1477863002 .
1 parent afde8f4 commit 45829a6

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

tool/doc.dart

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@ const ruleLeadMatter = 'Rules are organized into familiar rule groups.';
5555
final List<LintRule> rules =
5656
new List<LintRule>.from(ruleRegistry, growable: false)..sort();
5757

58-
String get enumeratePubRules => rules
59-
.where((r) => r.group == Group.pub)
58+
String get enumerateErrorRules => rules
59+
.where((r) => r.group == Group.errors)
6060
.map((r) => '${toDescription(r)}')
6161
.join('\n\n');
6262

@@ -65,6 +65,11 @@ String get enumerateGroups => Group.builtin
6565
'<li><strong>${g.name}</strong> - ${markdownToHtml(g.description)}</li>')
6666
.join('\n');
6767

68+
String get enumeratePubRules => rules
69+
.where((r) => r.group == Group.pub)
70+
.map((r) => '${toDescription(r)}')
71+
.join('\n\n');
72+
6873
String get enumerateStyleRules => rules
6974
.where((r) => r.group == Group.style)
7075
.map((r) => '${toDescription(r)}')
@@ -212,6 +217,10 @@ class Indexer {
212217
${markdownToHtml(ruleFootMatter)}
213218
</p>
214219
220+
<h2 id="styleguide-rules">Error Rules</h2>
221+
222+
$enumerateErrorRules
223+
215224
<h2 id="styleguide-rules">Style Rules</h2>
216225
217226
$enumerateStyleRules

0 commit comments

Comments
 (0)