-
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,6 @@ buildscript { | |
dependencies { | ||
classpath 'com.palantir.gradle.jdks:gradle-jdks:0.27.0' | ||
classpath 'com.palantir.gradle.jdkslatest:gradle-jdks-latest:0.4.0' | ||
classpath 'com.google.errorprone:error_prone_core:2.14.0' | ||
classpath 'com.palantir.baseline:gradle-baseline-java:4.161.0' | ||
classpath 'com.palantir.gradle.consistentversions:gradle-consistent-versions:2.11.0' | ||
classpath 'com.palantir.gradle.externalpublish:gradle-external-publish-plugin:1.11.0' | ||
|
@@ -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 commentThe 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 |
||
|
||
// warnings not explicitly provided by error-prone | ||
error 'NullAway', | ||
|
@@ -78,10 +78,6 @@ allprojects { | |
'PreferSafeLoggableExceptions', | ||
'PreferSafeLogger' | ||
|
||
// 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[]) | ||
Comment on lines
-81
to
-84
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These imports were the main reason for needing |
||
|
||
disable 'AndroidJdkLibsChecker', // ignore Android | ||
'Java7ApiChecker', // tritium requires JDK 11+ | ||
|
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.