Skip to content
A simplistic Scalafix rule that sorts imports
Branch: master
Clone or download
pjrt and NeQuissimus Update README's config example (#7)
* Update README's config example

This will take care of issue #6 without requiring code changes

* Add the `.` to the `com.sun` part as well.
Latest commit 736eef2 Sep 9, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information.
.circleci Do not release from branches Jun 23, 2019
scalafix Add test for local import list Sep 8, 2019
.gitignore Test Jun 20, 2019 Update README's config example (#7) Sep 9, 2019



SortImports is a simplistic Scalafix rule.

It will organize imports into prefix-blocks and order imports inside those blocks alphabetically.

For example, these imports

import scala.util._
import scala.collection._
import java.util.Map
import com.sun._

will be organized as follows

import java.util.Map

import scala.collection._
import scala.util._


import com.sun._

if the blocks from the below Configuration example are used.

Important sort-imports does not (currently) take into account shadowing. It is a faily dumb sorter of imports. If your code is using shadowing, it may end up no longer compiling!


scalafixDependencies += "com.nequissimus" %% "sort-imports" % "0.2.1"


rule = SortImports
SortImports.blocks = [
You can’t perform that action at this time.