Disable checks for an entire package.
See original GitHub issueI’m adding error-prone to a legacy project and have the need to disable/ignore an entire package.
This package is a transplant from a third-party dependency that isn’t published as a consumable artifact but also requires a very small tweak to work in my usage. Since I want to reduce the changes to this package so future updates are easy, I’m hesitant to go in and annotation every type with a suppression for every violation therein.
Unfortunately the @SuppressWarnings
annotation can’t be targeted at packages so I can’t use it in a package-info.java
either (not sure this would have worked anyway).
Is there any other way of suppressing checks for an entire package? And if not, what do you think about introducing a mechanism for this (e.g., an exclude flag which was a list of globs)?
Issue Analytics
- State:
- Created 7 years ago
- Reactions:5
- Comments:7 (3 by maintainers)
Top GitHub Comments
I think it very useful to have a glob/pattern matching solution where error prone can skip all analysis on generated code for example. Then it is not purely controlled by an annotation
I have a similar need regarding generated code (gRPC-generated code specifically).