Skip to content

Commit

Permalink
Suggestion
Browse files Browse the repository at this point in the history
  • Loading branch information
rickie committed Jul 24, 2023
1 parent 5ac07bc commit 163e405
Showing 1 changed file with 1 addition and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -185,15 +185,7 @@ public ErrorProneScanner(Iterable<BugChecker> checkers, Map<String, SeverityLeve
ImmutableSet.Builder<Class<? extends Annotation>> annotationClassesBuilder =
ImmutableSet.builder();
for (BugChecker checker : this.bugCheckers) {
// When disabling a check using -Xep:<BugChecker>:OFF
// its `SeverityLevel` is removed from the `severityMap` in
// com.google.errorprone.scanner.ScannerSupplier#L210
//
// If a checker is disabled, there's no need to register the checker.
// If the checker is still registered, attempting to report any matches will result in a a
// NoSuchElementException while retrieving the
// severity level in:
// `com.google.errorprone.matchers.Description#severity()`.
// If a checker is disabled, there's no need to register it.
if (!severities.containsKey(checker.canonicalName())) {
continue;
}
Expand Down

0 comments on commit 163e405

Please sign in to comment.