-
Notifications
You must be signed in to change notification settings - Fork 10
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
Rely on gradle-baseline provided error-prone #1567
Conversation
@@ -68,6 +67,7 @@ allprojects { | |||
options.errorprone { | |||
option('NullAway:AnnotatedPackages', 'com.palantir') | |||
option('NullAway:CheckOptionalEmptiness', 'true') | |||
option('AllSuggestionsAsWarnings') // https://github.com/google/error-prone/pull/3301 |
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.
Very nifty!
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.
Hello, the author of the linked Error Prone ticket here!
I just wanted to point out that we maintain our own fork of Error Prone where we already support this feature.
It's a fork that contains a minimal set of changes on top of mainline Error Prone. We've been using it internally for years.
Just to give you an idea; see the extra commits we have on top of the original v2.15.0
tag here PicnicSupermarket/error-prone@v2.15.0...v2.15.0-picnic-3.
@@ -68,6 +67,7 @@ allprojects { | |||
options.errorprone { | |||
option('NullAway:AnnotatedPackages', 'com.palantir') | |||
option('NullAway:CheckOptionalEmptiness', 'true') | |||
option('AllSuggestionsAsWarnings') // https://github.com/google/error-prone/pull/3301 |
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 feature isn't yet released, but this should pick it up once we get the bump through gradle-baseline
// increase strictness for built-in error-prone checks | ||
error((com.google.errorprone.scanner.BuiltInCheckerSuppliers.ENABLED_WARNINGS + | ||
com.google.errorprone.scanner.BuiltInCheckerSuppliers.DISABLED_CHECKS | ||
).collect { it.canonicalName() } as String[]) |
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.
These imports were the main reason for needing com.google.errorprone:error_prone_core
on gradle classpath. Going to switch over to not-yet-merged or released AllSuggestionsAsWarnings
from google/error-prone#3301 to opt-in to more strict checks
Before this PR
Error-prone bumps required coordination of build.gradle gradle plugin classpath along with versions.props & gradle-baseline
Closes #1562 #1543
After this PR
==COMMIT_MSG==
Rely on gradle-baseline provided error-prone
==COMMIT_MSG==
Possible downsides?