mirror of https://github.com/sbt/sbt.git
use -Werror instead of -Xfatal-warnings
This commit is contained in:
parent
87765c7035
commit
2b9211e5b4
|
|
@ -14,7 +14,7 @@ object HouseRulesPlugin extends AutoPlugin {
|
|||
scalacOptions += "-language:implicitConversions",
|
||||
scalacOptions ++= "-Xfuture".ifScala213OrMinus.value.toList,
|
||||
scalacOptions ++= "-Xlint".ifScala2.value.toList,
|
||||
scalacOptions ++= "-Xfatal-warnings"
|
||||
scalacOptions ++= "-Werror"
|
||||
.ifScala3x(_ => {
|
||||
sys.props.get("sbt.build.fatal") match {
|
||||
case Some(_) => java.lang.Boolean.getBoolean("sbt.build.fatal")
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ object Utils {
|
|||
|
||||
lazy val baseScalacOptions = Seq(
|
||||
Compile / doc / scalacOptions -= "-Xlint",
|
||||
Compile / doc / scalacOptions -= "-Xfatal-warnings",
|
||||
Compile / doc / scalacOptions -= "-Werror",
|
||||
)
|
||||
|
||||
def projectComponent: Setting[?] =
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ lazy val root = (project in file("."))
|
|||
crossPaths := false,
|
||||
crossScalaVersions := Seq("2.12.20", "2.13.12"),
|
||||
scalaVersion := "2.12.20",
|
||||
Compile / doc / scalacOptions += "-Xfatal-warnings",
|
||||
Compile / doc / scalacOptions += "-Werror",
|
||||
commands += Command.command("excludeB") { s =>
|
||||
val impl = """val src = (Compile / sources).value; src.filterNot(_.getName.contains("B"))"""
|
||||
s"set Compile / doc / sources := { $impl }" :: s
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
scalaVersion := "2.12.20"
|
||||
scalacOptions += "-Xfatal-warnings" // required for the test
|
||||
scalacOptions += "-Werror" // required for the test
|
||||
|
||||
enablePlugins(ScalaUnidocPlugin)
|
||||
autoAPIMappings := true
|
||||
|
|
|
|||
|
|
@ -2,5 +2,5 @@ lazy val root = project.in(file("."))
|
|||
.enablePlugins(SbtPlugin)
|
||||
.settings(
|
||||
scalaVersion := "2.12.20",
|
||||
scalacOptions ++= Seq("-Xfatal-warnings", "-Xlint")
|
||||
scalacOptions ++= Seq("-Werror", "-Xlint")
|
||||
)
|
||||
|
|
|
|||
|
|
@ -2,5 +2,5 @@ lazy val root = project.in(file("."))
|
|||
.settings(
|
||||
scalaVersion := "2.12.20",
|
||||
sbtPlugin := true,
|
||||
scalacOptions ++= Seq("-Xfatal-warnings", "-Xlint")
|
||||
scalacOptions ++= Seq("-Werror", "-Xlint")
|
||||
)
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
Compile / scalacOptions += "-Xfatal-warnings"
|
||||
Compile / scalacOptions += "-Werror"
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
> 'set scalacOptions += "-Xfatal-warnings"'
|
||||
> 'set scalacOptions += "-Werror"'
|
||||
|
||||
> compile
|
||||
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ $ touch failure3
|
|||
-> testQuick
|
||||
$ delete failure3
|
||||
|
||||
> set Compile / scalacOptions += "-Xfatal-warnings"
|
||||
> set Compile / scalacOptions += "-Werror"
|
||||
|
||||
> set foo += "an argument with spaces"
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue