Skip to content

Conversation

@Plunts
Copy link
Contributor

@Plunts Plunts commented Nov 20, 2025

As requested in #2594, this MR introduces an expandWildcardImports step. 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.

@nedtwigg nedtwigg force-pushed the expandWildcardImports branch from db71c5d to 1a293cb Compare November 20, 2025 18:29
@nedtwigg
Copy link
Member

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...

Copy link
Contributor

@Pankraz76 Pankraz76 left a 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()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants