2020-08-15 06:04:21 +00:00
|
|
|
import sbt.Keys._
|
|
|
|
import sbt._
|
2020-09-04 05:18:34 +00:00
|
|
|
import scalafix.sbt.ScalafixPlugin.autoImport._
|
2020-08-15 06:04:21 +00:00
|
|
|
|
|
|
|
object LintingPlugin extends AutoPlugin {
|
|
|
|
override def trigger = allRequirements
|
|
|
|
|
2020-09-04 05:18:34 +00:00
|
|
|
override val globalSettings =
|
2020-08-28 06:18:25 +00:00
|
|
|
addCommandAlias("fmt", "scalafmtAll") ++
|
2020-08-15 06:04:21 +00:00
|
|
|
addCommandAlias("fix", "scalafixAll")
|
|
|
|
|
2020-09-04 05:18:34 +00:00
|
|
|
override val projectSettings =
|
|
|
|
Seq(
|
|
|
|
ThisBuild / scalafixDependencies += "com.github.liancheng" %% "organize-imports" % "0.4.0",
|
|
|
|
semanticdbEnabled := true,
|
|
|
|
semanticdbVersion := scalafixSemanticdb.revision
|
|
|
|
)
|
2020-08-15 06:04:21 +00:00
|
|
|
}
|