summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Lawson2020-06-08 14:06:56 -0700
committerGitHub2020-06-08 14:06:56 -0700
commit5271e89c09653fe0d38adf75b5bef1fe5d3539d2 (patch)
tree7342af0ef249a9a812b390c5b2558ecc09082aba
parent99ac8a134b134713913036013ffdec98ec92c73a (diff)
ScalaFix support from #1182 (#1203)
Co-authored-by: Chick Markley <chick@qrhino.com>
-rw-r--r--.scalafix.conf10
-rw-r--r--build.sbt6
-rw-r--r--project/plugins.sbt2
3 files changed, 17 insertions, 1 deletions
diff --git a/.scalafix.conf b/.scalafix.conf
new file mode 100644
index 00000000..3730a03e
--- /dev/null
+++ b/.scalafix.conf
@@ -0,0 +1,10 @@
+rules = [
+ # DisableSyntax
+ # ExplicitResultTypes
+ #LeakingImplicitClassVal
+ RemoveUnused
+ #NoAutoTupling
+ #NoValInForComprehension
+ #ProcedureSyntax
+]
+
diff --git a/build.sbt b/build.sbt
index 0ad5d8f6..db2c9723 100644
--- a/build.sbt
+++ b/build.sbt
@@ -140,7 +140,7 @@ lazy val core = (project in file("core")).
"-unchecked",
"-Xcheckinit",
"-Xlint:infer-any"
-// "-Xlint:missing-interpolator"
+// , "-Xlint:missing-interpolator"
)
).
dependsOn(macros)
@@ -185,3 +185,7 @@ lazy val chisel = (project in file(".")).
}
)
)
+
+addCommandAlias("com", "all compile")
+addCommandAlias("lint", "; compile:scalafix --check ; test:scalafix --check")
+addCommandAlias("fix", "all compile:scalafix test:scalafix")
diff --git a/project/plugins.sbt b/project/plugins.sbt
index 58cf5259..48f031e2 100644
--- a/project/plugins.sbt
+++ b/project/plugins.sbt
@@ -14,4 +14,6 @@ addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.9.0")
addSbtPlugin("com.eed3si9n" % "sbt-unidoc" % "0.4.3")
+addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.9.15")
+
addSbtPlugin("com.thoughtworks.sbt-api-mappings" % "sbt-api-mappings" % "3.0.0")