Feature request: disable a specific rule in some scope (tests, file, etc.)
Open
- Dominant language
- Java
- Stars
- 7.2k
- Forks
- 820
- Avg merge
- 5h 9m
- Merged PRs (30d)
- 50
Description
For example, I'd like to be able to disable `InterruptedExceptionSwallowed` (and some other rules) for tests but keep it enabled for non-tests. I also don't want to disable ErrorProne entirely, just a few rules.
IMHO best would be to have something similar to https://spotbugs.readthedocs.io/en/latest/filter.html
I do like the native suppress mechanism for individual false positives, but it's not very flexible on a larger scale.
Right now, I have to add `@SuppressWarnings({"InterruptedExceptionSwallowed"})` to individual test classes, which is not very nice.
Contributor guide
Assessment
This issue has not been assessed yet.