@@ -23,6 +23,7 @@ import sbtbuildinfo.BuildInfoPlugin
23
23
import sbtbuildinfo .BuildInfoPlugin .autoImport ._
24
24
25
25
import scala .util .Properties .isJavaAtLeast
26
+ import scalafix .sbt .ScalafixPlugin .autoImport ._
26
27
27
28
/* In sbt 0.13 the Build trait would expose all vals to the shell, where you
28
29
* can use them in "set a := b" like expressions. This re-exposes them.
@@ -88,7 +89,6 @@ object Build {
88
89
lazy val dotr =
89
90
inputKey[Unit ](" run compiled binary using the correct classpath, or the user supplied classpath" )
90
91
91
-
92
92
// Compiles the documentation and static site
93
93
lazy val genDocs = taskKey[Unit ](" run dottydoc to generate static documentation site" )
94
94
@@ -114,10 +114,12 @@ object Build {
114
114
organizationHomepage := Some (url(" http://lamp.epfl.ch" )),
115
115
116
116
scalacOptions ++= Seq (
117
+ " -Yrangepos" ,
117
118
" -feature" ,
118
119
" -deprecation" ,
120
+ " -Ywarn-unused-import" ,
119
121
" -unchecked" ,
120
- " -Xfatal-warnings" ,
122
+ // "-Xfatal-warnings",
121
123
" -encoding" , " UTF8" ,
122
124
" -language:existentials,higherKinds,implicitConversions"
123
125
),
@@ -745,7 +747,14 @@ object Build {
745
747
def dottyCompilerSettings (implicit mode : Mode ): sbt.Def .SettingsDefinition =
746
748
if (mode == NonBootstrapped ) nonBootstrapedDottyCompilerSettings else bootstrapedDottyCompilerSettings
747
749
748
- lazy val `dotty-compiler` = project.in(file(" compiler" )).asDottyCompiler(NonBootstrapped )
750
+ lazy val `dotty-compiler` = project
751
+ .settings(addCompilerPlugin(scalafixSemanticdb))
752
+ .settings(scalafixDependencies in ThisBuild +=
753
+ // "com.geirsson" %% "example-scalafix-rule" % "1.3.0"
754
+ " com.twitter" %% " rsc-rules" % " 0.0.0-406-6829ec44-20181004-1416"
755
+ )
756
+ .in(file(" compiler" )).asDottyCompiler(NonBootstrapped )
757
+
749
758
lazy val `dotty-compiler-bootstrapped` = project.in(file(" compiler" )).asDottyCompiler(Bootstrapped )
750
759
751
760
def dottyCompiler (implicit mode : Mode ): Project = mode match {
0 commit comments