Skip to content

Automate imports sorting #661

Open
@sebastian-peter

Description

@sebastian-peter

It is quite annoying that imports have to be sorted "manually", since different import orders can be committed and make merge conflicts more likely.

Luckily, there are tools that can

  1. format and sort imports via gradle command
  2. check for correctly formatted imports and fail CI otherwise

Scalafix with the OrganizeImports rule is one of those tools. There are further rules like DisableSyntax that could be helpful for keeping the code clean. There is a gradle plugin for scalafix.

Before integrating Scalafix into the project, research other tools that offer similar functionality - there might be some that are better suited for us.

Metadata

Metadata

Labels

formatIssues related to code formatting

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions