-
Notifications
You must be signed in to change notification settings - Fork 1
Description
Background
At Palantir, we're increasingly reliant on error-prone to automatically mitigate common correctness/safety pitfalls — it is an effective force multiplier for small infra teams. Two patterns that have emerged are
- Libraries shipping their own BugCheckers to enforce correct use of their APIs (see this internal library)
- Dedicated code quality repos which enforce correct use of APIs of other libraries (see gradle-guide-error-prone, baseline-error-prone).
Currently, there is considerable friction for libraries to ship their own error-prones. A library has to create a new error-prone project, create a Gradle plugin which applies the SuppressibleErrorPronePlugin, and add the error-prone jar as a dependency. Consumers of the library are trusted that alongside using the library, they will also apply the -error-prone plugin to enforce good behavior.
Desired behavior
Library authors shouldn't have to ship a gradle plugin. As long as the library consumer has suppressible-error-prone applied, the library's BugCheckers should be automatically ran during compilation.