6502-opcodes/project/LintingPlugin.scala

21 lines
558 B
Scala
Raw Normal View History

2020-08-15 02:04:21 -04:00
import sbt.Keys._
import sbt._
2020-09-04 01:18:34 -04:00
import scalafix.sbt.ScalafixPlugin.autoImport._
2020-08-15 02:04:21 -04:00
object LintingPlugin extends AutoPlugin {
override def trigger = allRequirements
2020-09-04 01:18:34 -04:00
override val globalSettings =
2021-03-19 01:58:34 -04:00
addCommandAlias("fmt", "; scalafmtSbt; scalafmtAll") ++
2020-08-15 02:04:21 -04:00
addCommandAlias("fix", "scalafixAll")
2020-09-04 01:18:34 -04:00
override val projectSettings =
2021-01-21 13:36:59 -05:00
inThisBuild(
Seq(
2021-03-01 01:03:44 -05:00
scalafixDependencies += "com.github.liancheng" %% "organize-imports" % "0.5.0",
2021-01-21 13:36:59 -05:00
semanticdbEnabled := true,
semanticdbVersion := scalafixSemanticdb.revision
)
2020-09-04 01:18:34 -04:00
)
2020-08-15 02:04:21 -04:00
}