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

Rely on gradle-baseline provided error-prone #1567

Merged
merged 1 commit into from
Sep 12, 2022
Merged

Conversation

schlosna
Copy link
Contributor

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?

@schlosna schlosna marked this pull request as ready for review September 12, 2022 14:42
@@ -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
Copy link
Contributor

Choose a reason for hiding this comment

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

Very nifty!

Copy link

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.

@bulldozer-bot bulldozer-bot bot merged commit 44c7e4f into develop Sep 12, 2022
@bulldozer-bot bulldozer-bot bot deleted the ds/errorprone branch September 12, 2022 14:46
@@ -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
Copy link
Contributor Author

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

Comment on lines -81 to -84
// 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[])
Copy link
Contributor Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants