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