Skip to content

Commit efcf24c

Browse files
Use -Werror only in CI
1 parent 763fe5e commit efcf24c

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

build.sbt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ lazy val graalvmV = "24.2.2"
1111

1212
addCommandAlias("fixAll", "scalafixAll; scalafmtAll")
1313

14+
lazy val wErrorIfCI = if (sys.env.contains("CI")) Seq("-Werror") else Seq()
15+
1416
def isDevBuild: Boolean =
1517
sys.env.get("DEV_BUILD").exists(s => s != "0" && s != "false")
1618

@@ -51,12 +53,11 @@ lazy val root = (project in file("."))
5153
),
5254
scalacOptions ++= Seq(
5355
"-Wunused:imports",
54-
"-Werror",
5556
"-feature",
5657
"-deprecation",
5758
"-unchecked",
5859
"-explain",
59-
),
60+
) ++ wErrorIfCI,
6061
buildInfoKeys := Seq[BuildInfoKey](
6162
version,
6263
scalaVersion,

0 commit comments

Comments
 (0)