Skip to content

Conversation

@Pankraz76
Copy link

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

as requested by @DaveCTurner

@elasticsearchmachine elasticsearchmachine added external-contributor Pull request authored by a developer outside the Elasticsearch team v9.2.0 labels Aug 17, 2025
@Pankraz76
Copy link
Author

ether you dont like code format on all your code, or its somehow broken as the FormattingPrecommitPlugin is broken and spotless does not care:

image

String importOrderPath = "build-conventions/elastic.importorder";
String formatterConfigPath = "build-conventions/formatterConfig.xml";

java.target("src/**/*.java");
Copy link
Author

Choose a reason for hiding this comment

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

just like rewrite and spring, spotless comes with a convention thats suitable for most cases.

@elasticsearchmachine elasticsearchmachine added the needs:triage Requires assignment of a team area label label Aug 17, 2025
@Pankraz76
Copy link
Author

Pankraz76 commented Aug 17, 2025

With this I can confirm Spotless is not able to do what you have requested and seem to desire in #132976 (comment).

So again it seems to be a good idea using some tool that's really capable.

It's no offence but Spotless is only good for fixing whitespaces and stuff, just like Checkstyle as both are not type-aware.

As you argue very often with quality and efficiency, rewrite seems to be the perfect solution for your problem.

If you want to have the control back over your code, which currently is clearly not the case, I highly suggest to stop starting but start finishing by using following facts meaning the numbers shown by the rewrite PR, demonstrating its potential and the weaknesses of Spotless.

It's actually just another command to run. We could even automate it fully so you don't even notice what's fixing your lacking code (imports) - Spotless or rewrite. This should actually be just like in the code - some random implementation detail that's irrelevant, as no body cares about the code itself, only about its functionality. You just want the fixes somehow, so why should you care about the how in detail, as its encapsulated in some CI pipeline?

Do you want some auto-apply of Spotless like Maven does? Or do you just not care as the PR will apply Spotless anyways, which is a nice solution implemented.

So actually there its not big deal for devs to use rewrite, assuming it's only the unused import recipe, no one should notice any difference as Spotless is doing the same, syncronizing them.

When introducing other recipes, the argument that a tool or in this case recipes could introduce non-trivial work as mentioned, yes. But I'm not asking for a new recipe yet.

I'm just asking to stop starting but start finishing. That's in everybody's favor.

@DaveCTurner
Copy link
Contributor

This doesn't fix any of the code formatting issues you raised so I'm closing it.

In addition, your increasingly strident criticisms of the development process chosen by this project are not an effective way to persuade us to spend time on the contributions you're offering. I'd recommend you focus your attention on other projects which find this approach to be acceptable.

@elastic elastic locked as resolved and limited conversation to collaborators Aug 17, 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