From 5271e89c09653fe0d38adf75b5bef1fe5d3539d2 Mon Sep 17 00:00:00 2001 From: Jim Lawson Date: Mon, 8 Jun 2020 14:06:56 -0700 Subject: ScalaFix support from #1182 (#1203) Co-authored-by: Chick Markley --- .scalafix.conf | 10 ++++++++++ build.sbt | 6 +++++- project/plugins.sbt | 2 ++ 3 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 .scalafix.conf 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") -- cgit v1.2.3