Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PreferJavaTimeOverload:OFF #1094

Merged
merged 2 commits into from
Dec 5, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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");
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So I think the checkExplicitlyDisabled function will actually prevent these auto-fixes being applied until we get rid of the explicit CheckSeverity.OFF setting... I'm kinda OK with just leaving this here so that when we re-enable the check it will start patching.


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