From 240743c0649228b9324e12080c6a5d337d2bbbdf Mon Sep 17 00:00:00 2001 From: xuwei-k <6b656e6a69@gmail.com> Date: Thu, 3 Oct 2024 20:37:45 +0900 Subject: [PATCH] update scalacOptions for Scala 3 --- project/HouseRulesPlugin.scala | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/project/HouseRulesPlugin.scala b/project/HouseRulesPlugin.scala index f69495cfd..ac2b86ad4 100644 --- a/project/HouseRulesPlugin.scala +++ b/project/HouseRulesPlugin.scala @@ -11,11 +11,11 @@ object HouseRulesPlugin extends AutoPlugin { lazy val baseSettings: Seq[Def.Setting[?]] = Seq( scalacOptions ++= Seq("-encoding", "utf8"), - scalacOptions ++= Seq("-deprecation", "-feature", "-unchecked", "-Xlint"), + scalacOptions ++= Seq("-deprecation", "-feature", "-unchecked"), scalacOptions += "-language:higherKinds", scalacOptions += "-language:implicitConversions", scalacOptions ++= "-Xfuture".ifScala212OrMinus.value.toList, - scalacOptions += "-Xlint", + scalacOptions ++= "-Xlint".ifScala213OrMinus.value, scalacOptions ++= "-Xfatal-warnings" .ifScala(v => { sys.props.get("sbt.build.fatal") match { @@ -27,9 +27,9 @@ object HouseRulesPlugin extends AutoPlugin { .toList, scalacOptions ++= "-Yinline-warnings".ifScala211OrMinus.value.toList, scalacOptions ++= "-Yno-adapted-args".ifScala212OrMinus.value.toList, - scalacOptions += "-Ywarn-dead-code", - scalacOptions += "-Ywarn-numeric-widen", - scalacOptions += "-Ywarn-value-discard", + scalacOptions ++= "-Ywarn-dead-code".ifScala213OrMinus.value, + scalacOptions ++= "-Ywarn-numeric-widen".ifScala213OrMinus.value, + scalacOptions ++= "-Ywarn-value-discard".ifScala213OrMinus.value, scalacOptions ++= "-Ywarn-unused-import".ifScala(v => 11 <= v && v <= 12).value.toList ) ++ Seq(Compile, Test).flatMap(c => (c / console / scalacOptions) --= Seq("-Ywarn-unused-import", "-Xlint")