-
Notifications
You must be signed in to change notification settings - Fork 742
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
lombok causes an IndexOutOfBoundsException in UnusedVariable #1250
Comments
Title says 2.3.2 but should say 2.3.3? I am also seeing this issue on 2.3.3, fixed by reverting to 2.3.2. |
I can unblock myself by adding -Xep:ParameterName:OFF as suggested in: |
This works though gradle.projectsEvaluated {
tasks.withType(JavaCompile).configureEach {
options.encoding = "UTF-8"
options.annotationProcessorPath = configurations.errorprone
options.errorprone.disableWarningsInGeneratedCode = true
options.errorprone.excludedPaths = ".*/build/gen.*/.*"
options.errorprone {
disable("ParameterName")
disable("UnusedVariable")
}
}
} |
re: #1250 (comment), if Re-opening to track crashes related to lombok and |
import lombok.extern.flogger.Flogger;
@Flogger
public class I1250 {}
|
I am a Lombok maintainer. If there's anything we can do to help, please let us know. (apart from not generating a field that is not used...) |
@rspilker I think most of the crashes are happening because the source positions for the AST nodes lombok adds are incomplete (e.g. missing end positions), or they get out of sync with the source (e.g. from The other thing I can think of is that if For |
@cushon Thanks for adding some code to ignore generated stuff, that should fix most problems. Meanwhile I started to add start and end positions for everything lombok generates. If that is finished and merged all remaining problmes should be solved. |
This didn't work for me on 2.19.1 with lombok 1.18.22.
|
Actually, my bad. Forgot the |
Description of the problem / feature request:
./gradlew clean compileJava
throws this errorFeature requests: what underlying problem are you trying to solve with this feature?
none, its applied by error-prone
2.3.3
Bugs: what's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
What version of Error Prone are you using?
errorproneJavacVersion = "9+181-r4173-1"
errorproneVersion = "2.3.2"
errorpronePluginVersion = "0.7.1"
openjdk version "1.8.0_192"
Have you found anything relevant by searching the web?
reverting back to
2.3.2
fixes the problem.I tried to exclude the BugPattern but that does not work:
The text was updated successfully, but these errors were encountered: