From 4989f213319a7d6ef42a25cd90507b5441f348b3 Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Sat, 7 Jan 2017 11:27:38 +0000 Subject: [PATCH] builder:DefaultReadmeIndexBuilder: move table header to README-template.md --- .../ruleset/builder/DefaultReadmeIndexBuilder.java | 14 +++++--------- builder/src/main/resources/README-template.md | 2 ++ 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/builder/src/main/java/net/kemitix/checkstyle/ruleset/builder/DefaultReadmeIndexBuilder.java b/builder/src/main/java/net/kemitix/checkstyle/ruleset/builder/DefaultReadmeIndexBuilder.java index d903376..27eeec4 100644 --- a/builder/src/main/java/net/kemitix/checkstyle/ruleset/builder/DefaultReadmeIndexBuilder.java +++ b/builder/src/main/java/net/kemitix/checkstyle/ruleset/builder/DefaultReadmeIndexBuilder.java @@ -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 lowerCaseRuleName() { diff --git a/builder/src/main/resources/README-template.md b/builder/src/main/resources/README-template.md index 432c0db..4698124 100644 --- a/builder/src/main/resources/README-template.md +++ b/builder/src/main/resources/README-template.md @@ -102,6 +102,8 @@ from the previous. ## All Checks +Rule|Level|Source|Enabled|Suppressable +----|-----|------|-------|------------ %s ## Enabled Checks