Skip to content

Conversation

@Pankraz76
Copy link

@Pankraz76 Pankraz76 commented Aug 15, 2025

enabler for:

  • Have you signed the contributor license agreement?
  • Have you followed the contributor guidelines?
  • If submitting code, have you built your formula locally prior to submission with gradle check?
  • If submitting code, is your pull request against main? Unless there is a good reason otherwise, we prefer pull requests against main and will backport as needed.
  • If submitting code, have you checked that your submission is for an OS and architecture that we support?
  • If you are submitting this code for a class then read our policy for that.

@elasticsearchmachine elasticsearchmachine added external-contributor Pull request authored by a developer outside the Elasticsearch team v9.2.0 needs:triage Requires assignment of a team area label labels Aug 15, 2025
import org.apache.lucene.util.BytesRef;
import org.elasticsearch.common.util.*;
import org.elasticsearch.compute.data.*;
import org.openjdk.jmh.annotations.*;
Copy link
Author

Choose a reason for hiding this comment

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

re run actually it will resolve all wildcard imports.

@DaveCTurner
Copy link
Contributor

We already have a rule forbidding unused imports. It seems as if it needs adjusting for these cases (excluding the generated code, we don't care about unused imports there). Definitely no need to take on all the work of adopting another static analysis tool just to do this tho. I'm closing this because I see that you're spamming the same sort of change across several unrelated projects on Github, but if you'd like to combine this change with adjustments to the Spotless config to prevent similar issues in future then please open a fresh PR to do that.

@Pankraz76
Copy link
Author

Spotless

can not handle wildcard import, it just a text parser, therefore considerer second class, PMD and rewrite both type aware.

@DaveCTurner
Copy link
Contributor

can not handle wildcard import

Sure, but wildcard imports are forbidden by other rules in this codebase. Clearly those rules aren't being applied everywhere, and we'd welcome a PR from you to fix up this misconfiguration.

@Pankraz76
Copy link
Author

Pankraz76 commented Aug 15, 2025

Yes, but even if the config is there, how to fix all the wildcards if not with rewrite?

I'm not going to "spend" time on this. Of course, I could run the plugin locally and commit the changes, but that's considered cheating—taking the changes, but not the plugin doing so.

Im only doing it the right way, in order not to waste our time.

As its not only about wildcards assuming security fixes done by file recipe are something important for elastic as well:

@Pankraz76
Copy link
Author

Assuming Spotless is broken because the convention-over-configuration principle wasn't properly implemented.

@DaveCTurner
Copy link
Contributor

No need to assume anything - if you'd like to open a PR to fix the Spotless config then that'd be very welcome, but if not then that's also fine. Either way, there's nothing more to discuss here so I'm locking this conversation.

@elastic elastic locked as resolved and limited conversation to collaborators Aug 16, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

external-contributor Pull request authored by a developer outside the Elasticsearch team needs:triage Requires assignment of a team area label v9.2.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants