mirror of
https://github.com/mcanlas/6502-opcodes.git
synced 2024-12-22 09:30:45 +00:00
scalafix
This commit is contained in:
parent
2384fd462e
commit
ceeacfb539
@ -7,8 +7,7 @@ lazy val root =
|
||||
)
|
||||
.withCats
|
||||
.withTesting
|
||||
.withOrganizeImports
|
||||
.aggregate(nescant)
|
||||
|
||||
lazy val nescant =
|
||||
project.withCats.withTesting.withOrganizeImports
|
||||
project.withCats.withTesting
|
||||
|
@ -1,25 +1,18 @@
|
||||
import sbt.Keys._
|
||||
import sbt._
|
||||
import scalafix.sbt.ScalafixPlugin.autoImport._
|
||||
|
||||
object LintingPlugin extends AutoPlugin {
|
||||
override def trigger = allRequirements
|
||||
|
||||
override lazy val globalSettings =
|
||||
override val globalSettings =
|
||||
addCommandAlias("fmt", "scalafmtAll") ++
|
||||
addCommandAlias("fix", "scalafixAll")
|
||||
|
||||
object autoImport {
|
||||
// this class name should be unique to evade implicit collision with other ops classes
|
||||
implicit class LintingOps(p: Project) {
|
||||
def withOrganizeImports: Project = {
|
||||
import scalafix.sbt.ScalafixPlugin.autoImport._
|
||||
|
||||
p.settings(
|
||||
ThisBuild / scalafixDependencies += "com.github.liancheng" %% "organize-imports" % "0.4.0",
|
||||
semanticdbEnabled := true,
|
||||
semanticdbVersion := scalafixSemanticdb.revision
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
override val projectSettings =
|
||||
Seq(
|
||||
ThisBuild / scalafixDependencies += "com.github.liancheng" %% "organize-imports" % "0.4.0",
|
||||
semanticdbEnabled := true,
|
||||
semanticdbVersion := scalafixSemanticdb.revision
|
||||
)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user