-
Notifications
You must be signed in to change notification settings - Fork 494
new step to expand java wildcard imports #2744
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
base: main
Are you sure you want to change the base?
Conversation
db71c5d to
1a293cb
Compare
|
Amazing! This would be a fantastic feature to merge. I don't have time to examine it in detail at the moment, burned by time budget on fixing problems in our CI. Thanks for the great contribution and I'll try to get to this ASAP! Hopefully some other reviewers can take a stab at it... |
Pankraz76
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
great feature, thanks.
| ``` | ||
| spotless { | ||
| java { | ||
| expandWildcardImports() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
finally don´t have to rely on rewrite anymore, as its not applying all.
As requested in #2594, this MR introduces an
expandWildcardImportsstep. To do this, JavaParser is used to parse the complete sourcecode and resolve the full qualified name of all used classes and static methods.The operation is currently only implemented for Gradle, as I am not familiar enough with the maven plugin system to provide the necessary classpath information.