Skip to content

[BUG] The spotless should take care of unified imports ordering #9306

@reta

Description

@reta

Is your feature request related to a problem? Please describe.
Came out of #9082 (review), the spotless does not enforce any formatting on order of imports statements, as such those are very chaotic in the codebase.

Describe the solution you'd like
The spotless should take care of unified imports ordering, the suggested formatting rules are not ideal but they should minimized the amount of files being changed at the same time, bringing consistent order to import statements:

importOrder(
              'de.thetaphi',
              'com.carrotsearch',
              'com.fasterxml',
              'com.avast',
              'com.sun',
              'com.maxmind|com.github|com.networknt|groovy|nebula',
              'org.antlr',
              'software.amazon',
              'com.azure|com.microsoft|com.ibm|com.google|joptsimple|org.apache|org.bouncycastle|org.codehaus|org.opensearch|org.objectweb|org.joda|org.hamcrest|org.openjdk|org.gradle|org.junit',
              'javax',
              'java',
              '',
              '\\#java|\\#org.opensearch|\\#org.hamcrest|\\#'
          )

Describe alternatives you've considered
Keep the chaotic imports

Additional context

  • benchmarks/
  • buildSrc/
  • client/
  • distribution/
  • libs/
  • modules/
  • plugins/
  • qa/
  • server/
  • test/

Metadata

Metadata

Assignees

Labels

enhancementEnhancement or improvement to existing feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions