-
Notifications
You must be signed in to change notification settings - Fork 134
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
improvement: Disable inner import on classes that cause errorprone to fail #1617
Conversation
Why don't we disable inner class imports entirely? The outer class provides important context, otherwise the imported class shouldn't be nested. |
I agree with the motivation behind the original change and have found other cases (ex. Timber, Jackson, etc.) where importing the nested classes improves legibility and succinctness without a loss in clarity |
I don't agree with the original change, it's unfortunate that we penalize everyone for suboptimal generated code layout. I'd noticed inner classes getting auto-imported by my IDE lately and assumed it was an idea EA bug. This change shifts the needle the other direction which is an improvement, it's unfortunate that I missed the original discussion. |
This PR has been automatically marked as stale because it has not been touched in the last 14 days. If you'd like to keep it open, please leave a comment or add the 'long-lived' label, otherwise it'll be closed in 7 days. |
Released 3.67.0 |
Before this PR
Errorprone produces
BadImport
which fails if you import nested classes with commonly used names. We however configured intellij to blindly auto-import nested classes where possible.After this PR
==COMMIT_MSG==
Disable inner import on classes that cause ErrorProne to fail
==COMMIT_MSG==
List of classes to disable sourced from here
Possible downsides?