He-Pin opened a new pull request, #3342: URL: https://github.com/apache/pekko/pull/3342
### Motivation The `com.nequissimus:sort-imports:0.6.1` plugin has not been updated since December 2021 and is effectively unmaintained. Scalafix's built-in `OrganizeImports` rule (available since 0.11.0, project uses 0.14.7) is more powerful, actively maintained, and requires no external dependency. ### Modification - Replace `SortImports` rule with `OrganizeImports` in `.scalafix.conf`, configured with 10 import groups matching Pekko's existing style (java/javax, scala, third-party, com.sun, pekko/akka, reactivestreams, netty, scalatest, slf4j, typesafe) - Remove `SortImports` from `.scalafmt.conf` `rewrite.rules` to avoid conflict with scalafix - Remove `com.nequissimus:sort-imports:0.6.1` dependency from `ScalaFixExtraRulesPlugin` - Update `sortImports` command alias in `build.sbt`, `ScalaFixForJdk21Plugin`, and `ScalafixForMultiNodePlugin` to use `OrganizeImports` - Add `-Wunused:imports` compiler option for Scala 2.13 and Scala 3 to support `OrganizeImports.removeUnused` - Disable `RemoveUnused.imports` (conflicts with `OrganizeImports`) and enable `OrganizeImports.removeUnused = true` instead - Apply full project import reformatting across all main and test sources (1991 files) ### Result Import sorting now uses scalafix's built-in `OrganizeImports` rule with no external dependency. The `sbt sortImports` command continues to work as before, now also automatically removing unused imports. Import grouping matches Pekko's existing style with 10 configured groups. ### Tests - `sbt "Test / compile"` passed with Java 21 ### References None - build tooling improvement -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
