For the import order, note that Spotless configuration is aligned with `.editorconfig` in `log4j-tools`. I find this pretty important and it took me a while to get them working in the same way. Once we ship Spotless and `.editorconfig` hand in hand, given we all use IDEA and it has pretty decent `.editorconfig` support, the transition will be seamless from maintainers point of view.
I like the `sortPom` idea too – it is not perfect, yet _a rule_ we can enforce. Does `sortPlugins` enforce an order in `build > plugins` too? If so, this is a really bad idea, since there order matters and semantic grouping is pretty common to make that XML soup digestible. Long story short, I support both these initiatives. Once you touch these, would you also make sure all projects (`log4j2`, `log4j-tools`, and `log4j-transform`) On Sat, Jan 14, 2023 at 10:52 AM Piotr P. Karwasz <piotr.karw...@gmail.com> wrote: > Hi all, > > I noticed a difference in the spotless configuration of our repos. > > The `logging-log4j2` repo uses: > > <order>java,org,com,\#</order> > > The `logging-log4j-tools` repo uses: > > > <order>java,javax,org.apache.logging,,\#java,\#javax,\#org.apache.logging,\#</order> > > I copied the latter to `logging-log4j-transform`, so I don't disagree > with it. However I would like a common rule for all repos, so that I > can configure my editor accordingly. > > Should we move Volkan's order to all other repos? I am not sure if > `org.apache.logging` imports should be highlighted with their own > group (it might be unexpected for contributors), but it looks nice. > > Another question is POM sorting. In `logging-log4j-transform` I > experimented with: > > <sortPom> > <expandEmptyElements>false</expandEmptyElements> > <keepBlankLines>true</keepBlankLines> > <indentSchemaLocation>true</indentSchemaLocation> > <sortDependencies>scope,artifactId,groupId</sortDependencies> > <sortDependencyExclusions>artifactId,groupId</sortDependencyExclusions> > <sortPlugins>artifactId,groupId</sortPlugins> > </sortPom> > > This is basically what I tried to do in September, the only difference > is that it does not (and can not) sort `org.apache.logging` artifacts > before all others. What do you think about introducing the Spotless > rule to the main repo? > > Piotr >