fix and automate importOrder with Maven Spotless Plugin#5776
Conversation
| .extensions("cls", "trigger") | ||
| .addVersion("52") | ||
| .addVersion("53") | ||
| .addVersion("54") |
There was a problem hiding this comment.
consider palantir block style like seen in spring:
There was a problem hiding this comment.
|
now its up to you how to continue:
|
|
@adangel @oowekyala what do you think? is pmd build already fixing itself like in maven? |
|
Compared to main: (comment created at 2025-06-20 14:13:41+00:00 for 757a818) |
oowekyala
left a comment
There was a problem hiding this comment.
This causes countless conflicts with main and with other in-flight PRs. Please adapt the formatter config to minimize changes.
yes we on the same page. This is kind of an issue itself, as new dev´s should use this config as setup. Is there any chance to simple apply convention cover configuration and go with palantir block style? This would make things easy as relying on big players. https://github.com/palantir/palantir-java-format Adapting the config to checkstyle can be intense. |
Eclipse Formatter Profile into Maven Spotless PluginMaven Spotless Plugin palantir-java-format: A modern, lambda-friendly, 120 character Java formatter.
if config is updated it should be no problem. thats a good example why migration is useful. Replace https://docs.pmd-code.org/latest/pmd_devdocs_contributing.html#code-style |
|
please check on your system and give format on your behalf. Current checkstyle config is pretty huge demanding cost of carry. Might be simple to apply convention over configuration what PMD itself is about. Giving end on discussion and opinion, just going with common default crafted by community. Only effort is to choose which one.
|
Maven Spotless Plugin palantir-java-format: A modern, lambda-friendly, 120 character Java formatter.|
trying to migrate https://github.com/pmd/build-tools/blob/main/src/main/resources/net/sourceforge/pmd/pmd-checkstyle-config.xml to eclipse format. |
|
whitespaces:
|
|
no need to maintain limited tool check, imho. i like check very much, but spot is obviously superior. facing all the issues, is thre any chance to really consider migration? @adangel |
Maven Spotless Plugin
ccc89ca to
a2daa1a
Compare
|
|
build pass 👍 thank you. |
Maven Spotless PluginMaven Spotless Plugin
Maven Spotless Plugincheckstyle import burden with Maven Spotless Plugin
checkstyle import burden with Maven Spotless Plugincheckstyle burden imposed on trimTrailingWhitespace and removeUnusedImports with Maven Spotless Plugin
|
Please discuss these changes in #5651. |
assuming approach is complain, as not contradiction encountered, we could reopen this to fix import burden and focus on features instead of being blocked by automatable cosmetics. |
checkstyle burden imposed on trimTrailingWhitespace and removeUnusedImports with Maven Spotless PluginimportOrder with Maven Spotless Plugin



checkstyleburden imposed ontrimTrailingWhitespaceandremoveUnusedImportswithMaven Spotless Plugin#5848just like quarkus having eclipse config in place make is the perfect candidate for auto fix static analysis with spotless.
Eclipse Formatter ProfileintoMaven Spotless Pluginquarkusio/quarkus#48041Eclipse Formatter ProfileintoMaven Spotless Pluginspring-projects/spring-framework#34978maven has check and spot so of course its possible to have both but actually spot covers what check does in ideal making it redundant.
as seen in quarkus they have aligned config having seen here changed 7 years ago its clear thats its out of date: