Skip to content

Commit

Permalink
Turn up various Error Prone checks (#710)
Browse files Browse the repository at this point in the history
I ran into violations of some of these issues when collaborating on another change. I think they are all fairly uncontroversial.
  • Loading branch information
msridhar authored Jan 7, 2023
1 parent afb8fd4 commit ab0a17d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
6 changes: 6 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,16 @@ subprojects { project ->
check("StringSplitter", CheckSeverity.OFF)
// https://github.com/google/error-prone/issues/3366
check("CanIgnoreReturnValueSuggester", CheckSeverity.OFF)
// turn up various checks
check("WildcardImport", CheckSeverity.ERROR)
check("MissingBraces", CheckSeverity.ERROR)
check("TypeToString", CheckSeverity.ERROR)
check("SymbolToString", CheckSeverity.ERROR)
check("MultipleTopLevelClasses", CheckSeverity.ERROR)
check("ClassName", CheckSeverity.ERROR)
check("PackageLocation", CheckSeverity.ERROR)
check("UnnecessaryAnonymousClass", CheckSeverity.ERROR)
check("UnusedException", CheckSeverity.ERROR)
}
} else {
// Disable Error Prone checks on JDK 8, as more recent Error Prone versions don't run on JDK 8
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@ public void doTest() {
Path outputPath = outputDir.resolve(fileName);
try {
Files.deleteIfExists(outputPath);
} catch (IOException ignored) {
throw new RuntimeException("Failed to delete older file at: " + outputPath);
} catch (IOException e) {
throw new RuntimeException("Failed to delete older file at: " + outputPath, e);
}
compilationTestHelper.doTest();
List<T> actualOutputs = readActualOutputs(outputPath);
Expand Down

0 comments on commit ab0a17d

Please sign in to comment.