builder:DefaultReadmeIndexBuilder: move table header to README-template.md

This commit is contained in:
Paul Campbell 2017-01-07 11:27:38 +00:00
parent 9f979955f8
commit 4989f21331
2 changed files with 7 additions and 9 deletions

View file

@ -44,21 +44,17 @@ public class DefaultReadmeIndexBuilder implements ReadmeIndexBuilder {
private static final String NEWLINE = "\n";
private static final String HEADERROW = "Rule|Level|Source|Enabled|Suppressable\n";
private static final String SEPARATOR = "----|-----|------|-------|------------\n";
private static final Locale LOCALE = Locale.ENGLISH;
private final RulesProperties rulesProperties;
@Override
public final String build() {
return HEADERROW + SEPARATOR + rulesProperties.getRules()
.stream()
.sorted(Comparator.comparing(lowerCaseRuleName()))
.map(this::formatRuleRow)
.collect(Collectors.joining(NEWLINE));
return rulesProperties.getRules()
.stream()
.sorted(Comparator.comparing(lowerCaseRuleName()))
.map(this::formatRuleRow)
.collect(Collectors.joining(NEWLINE));
}
private Function<Rule, String> lowerCaseRuleName() {

View file

@ -102,6 +102,8 @@ from the previous.
## All Checks
Rule|Level|Source|Enabled|Suppressable
----|-----|------|-------|------------
%s
## Enabled Checks