Skip to content

Commit

Permalink
PreferJavaTimeOverload:OFF (#1094)
Browse files Browse the repository at this point in the history
The `PreferJavaTimeOverload` error-prone check is turned off to avoid false positives
  • Loading branch information
iamdanfox authored and bulldozer-bot[bot] committed Dec 5, 2019
1 parent dbb8505 commit dcd4332
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
6 changes: 6 additions & 0 deletions changelog/@unreleased/pr-1094.v2.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
type: fix
fix:
description: The `PreferJavaTimeOverload` error-prone check is turned off as it
produces noisy false positives relating to custom AssertJ utilities.
links:
- https://github.com/palantir/gradle-baseline/pull/1094
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ public class BaselineErrorProneExtension {
// Built-in checks
"ArrayEquals",
"MissingOverride",
"UnnecessaryParentheses");
"UnnecessaryParentheses",
"PreferJavaTimeOverload");

private final ListProperty<String> patchChecks;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,7 @@ private static void configureErrorProneOptions(
errorProneOptions.setExcludedPaths(String.format(
"%s%s(build|src%sgenerated.*)%s.*", Pattern.quote(projectPath), separator, separator, separator));
errorProneOptions.check("UnusedVariable", CheckSeverity.OFF);
errorProneOptions.check("PreferJavaTimeOverload", CheckSeverity.OFF); // https://github.com/google/error-prone/issues/1435, https://github.com/google/error-prone/issues/1437
errorProneOptions.check("EqualsHashCode", CheckSeverity.ERROR);
errorProneOptions.check("EqualsIncompatibleType", CheckSeverity.ERROR);
errorProneOptions.check("StreamResourceLeak", CheckSeverity.ERROR);
Expand All @@ -200,13 +201,13 @@ private static void configureErrorProneOptions(
errorProneOptions.check("URLEqualsHashCode", CheckSeverity.ERROR);

if (jdkVersion.compareTo(JavaVersion.toVersion("12.0.1")) >= 0) {
// Errorprone isn't officially compatible with Java12, but in practise everything
// As of version 2.3.4, Errorprone isn't officially compatible with Java12, but in practise everything
// works apart from this one check: https://github.com/google/error-prone/issues/1106
errorProneOptions.check("Finally", CheckSeverity.OFF);
}

if (jdkVersion.compareTo(JavaVersion.toVersion("13.0.0")) >= 0) {
// Errorprone isn't officially compatible with Java13 either
// Errorprone 2.3.4 isn't officially compatible with Java13 either
// https://github.com/google/error-prone/issues/1106
errorProneOptions.check("TypeParameterUnusedInFormals", CheckSeverity.OFF);
errorProneOptions.check("PreferCollectionConstructors", CheckSeverity.OFF);
Expand Down

0 comments on commit dcd4332

Please sign in to comment.