Nothing is "wrong with it" -- it's a little esoteric and very tied to the Spotless tool as custom written software. (https://github.com/diffplug/spotless/blob/main/lib/src/main/java/com/diffplug/spotless/java/ImportSorter.java)
My discussion is centered around eventual migration to probably tree-wide formatting which a good first step is adopting import sorting from a Java formatter (in this case google-java-format). On Thu, Feb 20, 2025 at 6:54 PM Chia-Ping Tsai <chia7...@gmail.com> wrote: > > hi Farid > > I'm curious, what is the problem with the current import order? > > Best, > Chia-Ping > > Farid Zakaria <fzaka...@confluent.io.invalid> 於 2025年2月21日 週五 上午3:46寫道: > > > Hi Kafka developers, > > > > I've seen some previous discussions in the past about "adopting > > formatting" for the Kafka codebase a la google-java-format. > > > > While such a discussion may be ongoing and require further iterations; > > I was wondering if we could start somewhere smaller. > > > > google-java-format has the ability to *solely* sort imports. > > This is the default implementation of Spotless when not given any > > configuration. > > (Otherwise it defaults to some custom Java code within the plugin that > > was inspired by an Eclipse plugin) > > > > I'd like to propose changing the spotless configuration to have no > > setup and thus leverage google-java-format; *solely* to sort imports. > > > > This would deviate from the current import order of: > > importOrder('kafka', 'org.apache.kafka', 'com', 'net', 'org', 'java', > > 'javax', '', '\\#') > > > > Please let me know your thoughts. > >