Skip to content

Make it easy for libraries to ship their own BugCheckers #178

@kelvinou01

Description

@kelvinou01

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

  1. Libraries shipping their own BugCheckers to enforce correct use of their APIs (see this internal library)
  2. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions