Skip to content

Commit

Permalink
Added -Xlint:-unused,_ to 2.12+ builds
Browse files Browse the repository at this point in the history
  • Loading branch information
djspiewak committed Jun 23, 2018
1 parent 786ff61 commit 95a45d0
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions core/src/main/scala/sbtspiewak/SpiewakPlugin.scala
Original file line number Diff line number Diff line change
Expand Up @@ -145,11 +145,18 @@ object SpiewakPlugin extends AutoPlugin {
},

scalacOptions ++= {
val warnings211 = Seq(
"-Ywarn-unused-import", // Not available in 2.10
"-Ywarn-numeric-widen") // In 2.10 this produces a some strange spurious error

val warnings212 = Seq("-Xlint:-unused,_")

scalaVersion.value match {
case FullScalaVersion(2, minor, _, _, _) if minor >= 12 =>
warnings211 ++ warnings212

case FullScalaVersion(2, minor, _, _, _) if minor >= 11 =>
Seq(
"-Ywarn-unused-import", // Not available in 2.10
"-Ywarn-numeric-widen") // In 2.10 this produces a some strange spurious error
warnings211

case _ => Seq.empty
}
Expand Down

0 comments on commit 95a45d0

Please sign in to comment.