-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Upgrade errorprone to 2.36.0 #14216
Upgrade errorprone to 2.36.0 #14216
Conversation
0e79ceb
to
89b88a7
Compare
@@ -391,11 +391,7 @@ public void testSort() throws IOException { | |||
for (int j = 0; j < numSortFields; ++j) { | |||
sortFields[j] = randomIndexSortField(); | |||
} | |||
if (supportsHasBlocks()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't understand why this was the same for both...
break | ||
|
||
case ":lucene:queryparser": | ||
options.errorprone.excludedPaths.set("" + |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This tries to avoid checking all the generated code. The list was taken from the Spotless module and modified into regex form.
'-Xep:NonOverridingEquals:WARN', | ||
'-Xep:NotJavadoc:WARN', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is where all the /**
to /*
comes from
@@ -429,6 +508,8 @@ allprojects { prj -> | |||
'-Xep:OverrideThrowableToString:WARN', | |||
'-Xep:Overrides:WARN', | |||
// '-Xep:OverridesGuiceInjectableMethod:OFF', // we don't use guice | |||
'-Xep:OverridingMethodInconsistentArgumentNamesChecker:WARN', | |||
'-Xep:PatternMatchingInstanceof:WARN', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is where a majority of the changes come from. I do think it makes things a lot clearer, but am happy to revert this change too.
@@ -288,8 +341,10 @@ allprojects { prj -> | |||
// '-Xep:ChainedAssertionLosesContext:OFF', // we don't use truth | |||
// '-Xep:CharacterGetNumericValue:OFF', // noisy | |||
// '-Xep:ClassCanBeStatic:OFF', // noisy | |||
// '-Xep:ClassInitializationDeadlock:OFF', // TODO: there are problems |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you've got my curiosity :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
serious chunk of work, thank you for working through it all!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice. Thank you, @risdenk
Description
Builds on top of #14201 which started with 2.18.0 and helps with the error described here #14200. This adds all the rules to
error-prone.gradle
and upgrades to the latest error prone plugin version (https://github.com/tbroyer/gradle-errorprone-plugin/releases) and error prone version.This was checked with
These are ones that potentially have problems but are commented out since the fixes were not trivial
ArrayRecordComponent
ClassInitializationDeadlock
LockOnNonEnclosingClassLiteral
All the rules from the different versions are linked below:
https://github.com/google/error-prone/releases/tag/v2.19.0
https://github.com/google/error-prone/releases/tag/v2.20.0
https://github.com/google/error-prone/releases/tag/v2.21.0
https://github.com/google/error-prone/releases/tag/v2.22.0
https://github.com/google/error-prone/releases/tag/v2.23.0
https://github.com/google/error-prone/releases/tag/v2.24.0
https://github.com/google/error-prone/releases/tag/v2.25.0
https://github.com/google/error-prone/releases/tag/v2.26.0
https://github.com/google/error-prone/releases/tag/v2.27.0
https://github.com/google/error-prone/releases/tag/v2.28.0
https://github.com/google/error-prone/releases/tag/v2.29.0
https://github.com/google/error-prone/releases/tag/v2.30.0
https://github.com/google/error-prone/releases/tag/v2.31.0
https://github.com/google/error-prone/releases/tag/v2.32.0
https://github.com/google/error-prone/releases/tag/v2.33.0
https://github.com/google/error-prone/releases/tag/v2.34.0
https://github.com/google/error-prone/releases/tag/v2.35.0
https://github.com/google/error-prone/releases/tag/v2.36.0