6502-opcodes/project/LintingPlugin.scala

21 lines
558 B
Scala
Raw Normal View History

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 =
2021-03-19 05:58:34 +00:00
addCommandAlias("fmt", "; scalafmtSbt; scalafmtAll") ++
2020-08-15 06:04:21 +00:00
addCommandAlias("fix", "scalafixAll")
2020-09-04 05:18:34 +00:00
override val projectSettings =
2021-01-21 18:36:59 +00:00
inThisBuild(
Seq(
2021-03-01 06:03:44 +00:00
scalafixDependencies += "com.github.liancheng" %% "organize-imports" % "0.5.0",
2021-01-21 18:36:59 +00:00
semanticdbEnabled := true,
semanticdbVersion := scalafixSemanticdb.revision
)
2020-09-04 05:18:34 +00:00
)
2020-08-15 06:04:21 +00:00
}