error-prone icon indicating copy to clipboard operation
error-prone copied to clipboard

Catch common Java mistakes as compile-time errors

Results 366 error-prone issues
Sort by recently updated
recently updated
newest added

Errorprone threw an exception, and its message asked me to file this bug report... The line that triggered the exception was: ` if (originalLevel == Level.ERROR) { ` And both...

The plugin is reporting patches written to a file, but no file writes are occurring. `-Xplugin:ErrorProne -XepAllErrorsAsWarnings -XepPatchChecks:DeadException -XepPatchLocation:${project.build.directory}` These are also logged as warnings, but they result in writes...

When many projects are processed and patched (like in a multi-module build with hundreds of modules), applying the patches is not straight-forward. The one option is to setup the plugin...

### Description of the problem / feature request: Version `2.4.0` breaks support for custom `Javadoc` tags. For some of my Java projects, I'm using `Maven's Javadoc Plugin` to create [Custom...

Assuming that we have the following code: ``` class SomeClass { @MustBeClosed Closeable someMethod() { return new AutoCloseable() { public void close() {}; }; } } ``` Two examples of...

Looking at [this line](https://github.com/google/error-prone/blob/d19024b059d9db804045fdc992c9f6f3ff073769/core/src/main/java/com/google/errorprone/bugpatterns/AbstractMustBeClosedChecker.java#L303) of code, I believe that we should be looking for the next statement that is not an empty variable declaration. For example: ``` Closeable closeable =...

I'm not sure if this exists or is something that would need to be added, but I ran though the documentation and source and I didn't see anything. What I...

``` error-prone version: 2.3.4 BugPattern: UnusedVariable Stack Trace: java.lang.IllegalArgumentException: invalid replacement: [2012, -1) () at com.google.common.base.Preconditions.checkArgument(Preconditions.java:458) at com.google.errorprone.fixes.Replacement.create(Replacement.java:37) at com.google.errorprone.fixes.SuggestedFix$ReplacementFix.getReplacement(SuggestedFix.java:397) at com.google.errorprone.fixes.SuggestedFix.getReplacements(SuggestedFix.java:91) at com.google.errorprone.fixes.AppliedFix$Applier.apply(AppliedFix.java:71) at com.google.errorprone.JavacErrorDescriptionListener.lambda$new$0(JavacErrorDescriptionListener.java:71) at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195) at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:177)...

A record whose constructor is annotated with `@Inject` seems to be causing this. Looks similar to: ```java record Foo(Map mapBarBaz) { @Inject Foo {} } ``` ``` error-prone version: 2.11.0...

https://github.com/google/error-prone/wiki/For-Developers talks about code style but not about importing the project as a whole. https://groups.google.com/g/error-prone-discuss/c/W-53qb8jwhE mentions the possibility of including `.iml` files in the repo. My understanding is that a...