Activate -Xfatal-warnings

This commit is contained in:
Adrien Piquerez 2024-03-05 10:41:07 +01:00
parent c15a4031a9
commit 95a82adffc
1 changed files with 9 additions and 10 deletions

View File

@ -14,16 +14,15 @@ object HouseRulesPlugin extends AutoPlugin {
scalacOptions += "-language:implicitConversions",
scalacOptions ++= "-Xfuture".ifScala213OrMinus.value.toList,
scalacOptions ++= "-Xlint".ifScala2.value.toList,
// TODO: uncomment once we can build without warnings on Scala 3
// scalacOptions ++= "-Xfatal-warnings"
// .ifScala3x(_ => {
// sys.props.get("sbt.build.fatal") match {
// case Some(_) => java.lang.Boolean.getBoolean("sbt.build.fatal")
// case _ => true
// }
// })
// .value
// .toList,
scalacOptions ++= "-Xfatal-warnings"
.ifScala3x(_ => {
sys.props.get("sbt.build.fatal") match {
case Some(_) => java.lang.Boolean.getBoolean("sbt.build.fatal")
case _ => true
}
})
.value
.toList,
scalacOptions ++= "-Ykind-projector".ifScala3.value.toList,
scalacOptions ++= "-Yinline-warnings".ifScala211OrMinus.value.toList,
scalacOptions ++= "-Yno-adapted-args".ifScala212OrMinus.value.toList,