Skip to content
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

Handling of SortPom #2002

Closed
Ekryd opened this issue Jan 16, 2024 · 5 comments
Closed

Handling of SortPom #2002

Ekryd opened this issue Jan 16, 2024 · 5 comments

Comments

@Ekryd
Copy link

Ekryd commented Jan 16, 2024

Hi!
I'm the author of SortPom and I just realised that you are using my plugin for sorting the pom file. This is Great!
Can I contribute to the integration with Spotless somehow?

More concretely, should SortPom react to any settings that Spotless has, such as encoding or line endings?
Or add support for endWithNewline?

@Goooler
Copy link
Member

Goooler commented Jan 16, 2024

PRs welcome :)

@Ekryd
Copy link
Author

Ekryd commented Jan 18, 2024

Anything special on your wish-list?

@nedtwigg
Copy link
Member

should SortPom react to any settings that Spotless has, such as encoding or line endings? Or add support for endWithNewline?

The Spotless value proposition is "if you implement a String -> String function, we will handle the rest" (contributing.md). We handle

  • line endings
  • encoding
  • fix idempotence problems
  • combine one function (e.g. sortPom) with other functions (e.g. endWithNewline)

So you don't need to respond to any of our settings. We, however, are obliged to respond to your settings, and this is how we model them:

If there's anything missing, feel free to add it :)

@Ekryd
Copy link
Author

Ekryd commented Feb 20, 2024

I have updated the SortPom plugin with support for endWithNewline; whether to ensure that sorted pom ends with a newline or not.

I have created a PR in spotless for that version bump: #2049
Hope that it can be of some use 😊

@Ekryd
Copy link
Author

Ekryd commented Mar 9, 2024

PR is merged now, all seems fine. Thanks for your great job around Spotless!! 👋

@Ekryd Ekryd closed this as completed Mar 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants