Skip to content

Commit

Permalink
Add a method that returns all warning-level checks
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 540993905
  • Loading branch information
cushon authored and Error Prone Team committed Jun 16, 2023
1 parent ddecce3 commit 0382648
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -617,6 +617,14 @@ public static ScannerSupplier errorChecks() {
return allChecks().filter(Predicates.in(ENABLED_ERRORS));
}

/**
* Returns a {@link ScannerSupplier} with the {@link BugChecker}s that are in the ENABLED_WARNINGS
* list.
*/
public static ScannerSupplier warningChecks() {
return allChecks().filter(Predicates.in(ENABLED_WARNINGS));
}

/** A list of all checks with severity ERROR that are on by default. */
public static final ImmutableSet<BugCheckerInfo> ENABLED_ERRORS =
getSuppliers(
Expand Down

0 comments on commit 0382648

Please sign in to comment.