Hi Volkan, On Wed, 8 Mar 2023 at 21:07, Volkan Yazıcı <vol...@yazi.ci> wrote: > I am in favor of removing the ratchet from Spotless and doing a bing bang. > Since such a PR would practically not be reviewable, I guess ideally a > committer or PMC member should do that. Once the commit lands, we can skim > through the changes in IDEA to make sure Spotless did not plant a backdoor > or something.
The changes applied by Spotless should be reproducible so anybody can open a PR and we can verify it with `git diff`. > One thing I am curious about is... *Do we all agree on the current Spotless > configuration?* Styling is pretty subjective and we should ideally have one > big bang. For instance, `log4j-tools` has a different Spotless configuration > <https://github.com/apache/logging-log4j-tools/blob/master/log4j-tools-parent/pom.xml#L257> > than Log4j and it doesn't use a particular Spotless Java formatter (e.g., > Palantir's), though this was a deliberate decision to make that > configuration align with the provided `.editorconfig` > <https://github.com/apache/logging-log4j-tools/blob/master/.editorconfig>. > Put another way, I would prefer a consistent Spotless+EditorConfig combo > across all Log4j projects. Such that we can ship this in `logging-parent` > and (hopefully) be done with formatting. The current Spotless configuration is: * use same end-of-line characters as Git, * use Unix-style end-of-line character at the end of the file, * replace tabs with 4 spaces, * fix header, * sort imports, * remove unused imports. Most notably it doesn't even correct the indentation of Java files (try indenting by 1 character). I have copied the configuration to `logging-parent`: https://github.com/apache/logging-parent/pull/10 The PR additionally takes care of XML and YAML files. In the `.editorconfig` file in `l-l-tools` I see a lot of IntelliJ specific configuration. We should probably also provide an Eclipse-specific formatting file. Piotr