error-prone
error-prone copied to clipboard
Catch common Java mistakes as compile-time errors
Optimize VisitorState#getConstantExpression By avoiding a second pass over the string. Fixes #4586 FUTURE_COPYBARA_INTEGRATE_REVIEW=https://github.com/google/error-prone/pull/4586 from PicnicSupermarket:sschroevers/optimize-getConstantExpression 45f34017c3148325841e492b2908af04957966a7
These changes prevent Refaster rules from introducing a static import that conflicts with an existing static import. Without these changes the new test case fails with the following error: ```...
In some cases we have code where the new `DuplicateBranches` check triggers but the code was intentional because the same thing needs to be done for different reasons, and there...
Since https://github.com/google/error-prone/pull/4621, I have been unable to build the project in IntelliJ (currently 2024.3.1.1). Certain files in the `check_api` module fail to compile; the error I see is `cannot find...
The `EnumOrdinal` check wisely says that "You should almost never invoke the `Enum.ordinal()` method" because it's not guaranteed to be stable. I think there should be a similar `EnumCompareTo` check...
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...
A variable that is used by JUnit5's `FieldSource` annotation will be flagged as an unused variable. The `FieldSource` annotation was introduced in JUnit version 5.11. Example: ```java class FieldSourceTest {...
When enabling NullAway's jspecify mode, the use of arrays needs to be annotated for stricter nullability. For example, ```console .../LocalAsyncCache.java:818: warning: [NullAway] Writing @Nullable expression into array with @NonNull contents....
[IfChainToSwitch] refactor; invert condition for early return
**Error-prone version:** 2.45.0 **BugPattern:** `OverridingMethodInconsistentArgumentNamesChecker` I have a codebase which depends on a partially obfuscated library (Minecraft modding, if interested. Nothing nefarious!). While the LVT is present for all functions,...