Skip to content

Commit

Permalink
Tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
Stephan202 committed Sep 30, 2022
1 parent 60c8c3f commit 424d772
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -92,13 +92,10 @@ private String getShortCheckName(String fullCheckName) {
private Optional<String> getLinkPattern(CodeTransformer delegate, String checkName) {
Iterator<String> nameComponents = CLASS_NAME_SPLITTER.splitToStream(checkName).iterator();
return getAnnotationValue(OnlineDocumentation.class, OnlineDocumentation::value, delegate)
.map(url -> url.replace(TOP_LEVEL_CLASS_URL_PLACEHOLDER, nameComponents.next()))
.map(
urlPattern ->
urlPattern.replace(TOP_LEVEL_CLASS_URL_PLACEHOLDER, nameComponents.next()))
.map(
urlPattern ->
urlPattern.replace(
NESTED_CLASS_URL_PLACEHOLDER, Iterators.getNext(nameComponents, "")));
url ->
url.replace(NESTED_CLASS_URL_PLACEHOLDER, Iterators.getNext(nameComponents, "")));
}

private SeverityLevel getSeverity(CodeTransformer delegate) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,9 +148,11 @@ private static Optional<SeverityLevel> toSeverityLevel(Severity severity) {
}

/**
* Updates the given {@link Description}'s details such that {@link
* VisitorState#reportMatch(Description)} will override the reported severity only if this bug
* checker's severity was explicitly configured.
* Updates the given {@link Description}'s details by standardizing the reported check name,
* updating the associated message, and optionally overriding its severity.
*
* <p>The assigned severity is overridden only if this bug checker's severity was explicitly
* configured.
*
* <p>The original check name (i.e. the Refaster template name) is prepended to the {@link
* Description}'s message. The replacement check name ("Refaster Rule", a name which includes a
Expand Down

0 comments on commit 424d772

Please sign in to comment.