README.md: include rule level in each rule's documentation

This commit is contained in:
Paul Campbell 2017-01-05 23:54:44 +00:00
parent a2b64abe77
commit 349c995f66
2 changed files with 197 additions and 195 deletions

388
README.md

File diff suppressed because it is too large Load diff

View file

@ -7,6 +7,7 @@ import org.springframework.stereotype.Component;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.Optional;
import java.util.stream.Stream;
/**
@ -38,6 +39,7 @@ class DefaultRuleReadmeLoader implements RuleReadmeLoader {
}
private String formatRuleHeader(final Rule rule) {
return String.format("%n#### [%s](%s)", rule.getName(), rule.getUri());
return String.format("%n#### [%s](%s) (%s)", rule.getName(), rule.getUri(), Optional.ofNullable(rule.getLevel())
.orElse(RuleLevel.UNSPECIFIED));
}
}