Unwanted execution of ImmutableEnumChecker by enabling Immutable check
- Dominant language
- Java
- Stars
- 7.2k
- Forks
- 820
- Avg merge
- 5h 9m
- Merged PRs (30d)
- 50
Description
Hi,
there is most likely some mistake in how these two checks are configured leading to false activation of unintended checks:
**Immutable**
* Type declaration annotated with `@Immutable` is not immutable
* https://errorprone.info/bugpattern/Immutable
* Severity: ERROR by default
**ImmutableEnumChecker**
* Enums should always be immutable
* https://errorprone.info/bugpattern/ImmutableEnumChecker
* Severity: WARNING by default
* ⚠ Alternate names: **Immutable**
The `ImmutableEnumChecker` warning declares the same name as the `Immutable` error.
Given a code that has `-XepDisableAllChecks -XepDisableAllWarnings -Xep:Immutable:ERROR`, trying to enable the former `Immutable` error for checking the `@Immutable` annotated types, it mistakenly activates the `ImmutableEnumChecker` at an ERROR level leading to unwanted failures.
Contributor guide
Assessment
This issue has not been assessed yet.