Skip to content

Conversation

Copy link

Copilot AI commented Jan 24, 2026

Implementation Plan for Issue diffplug#2829: Expand Wildcard Imports for Maven Plugin

  • Explore repository structure and understand current implementation
  • Understand how ForbidWildcardImportsStep currently works (it's a lint-only step)
  • Understand how FormatterStepConfig and FormatterStepFactory architecture works
  • Found existing ExpandWildcardImportsStep implementation from PR new step to expand java wildcard imports diffplug/spotless#2744
  • Extend FormatterStepConfig to include optional project classpath
  • Extend FormatterConfig to include Maven project reference
  • Modify FormatterFactory to provide protected method for classpath extraction
  • Override getProjectClasspath() in Java formatter factory to extract compile+test classpath
  • Create ExpandWildcardImports Maven plugin configuration class
  • Add method to Java formatter factory to register the new step
  • Test the implementation with a sample Maven project
  • Add tests for the new functionality
  • Update Maven plugin documentation
  • Verify changes don't break existing tests
Original prompt

I want to implement @diffplug/spotlessdiffplug/issues/2829

the main problem is that the ExpandWildcardImportsStep needs a Set typeSolverClasspath for the java parser to resolve dependencies

i can create the typeSolverClassPath from maven project using project.getCompileClasspathElements etc but i dont understand how to pass that to the FormatterStepFactory that will create the ExpandWildcardImportsStep


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

…hanges

Co-authored-by: shitikanth <544054+shitikanth@users.noreply.github.com>
Copilot AI requested a review from shitikanth January 24, 2026 03:45
Copilot stopped work on behalf of shitikanth due to an error January 24, 2026 03:45
@shitikanth shitikanth closed this Jan 24, 2026
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.

2 participants