From 96c07f2716696f0e956ba0a853d78235d5e77eee Mon Sep 17 00:00:00 2001 From: Raitis Veinbahs Date: Wed, 14 Feb 2024 16:34:03 +0100 Subject: [PATCH] chore: Add option to make warnings non-fatal locally. --- build.sbt | 3 +++ project/LocalSettings.scala | 13 +++++++++++++ 2 files changed, 16 insertions(+) create mode 100644 project/LocalSettings.scala diff --git a/build.sbt b/build.sbt index 18078c284f..8d5be3f77f 100644 --- a/build.sbt +++ b/build.sbt @@ -10,6 +10,7 @@ import scala.language.postfixOps import scala.sys.process.* import org.knora.Dependencies +import org.knora.LocalSettings ////////////////////////////////////// // GLOBAL SETTINGS @@ -194,6 +195,7 @@ lazy val webapi: Project = Project(id = "webapi", base = file("webapi")) logLevel := Level.Info, javaAgents += Dependencies.aspectjweaver ) + .settings(LocalSettings.localScalacOptions: _*) .settings( // prepare for publishing @@ -283,6 +285,7 @@ lazy val integration: Project = Project(id = "integration", base = file("integra Test / testOptions += Tests.Argument("-oDF"), // show full stack traces and test case durations libraryDependencies ++= Dependencies.webapiDependencies ++ Dependencies.webapiTestDependencies ++ Dependencies.integrationTestDependencies ) + .settings(LocalSettings.localScalacOptions: _*) .enablePlugins(SbtTwirl, JavaAppPackaging, DockerPlugin, JavaAgent, BuildInfoPlugin, HeaderPlugin) .settings( name := "integration", diff --git a/project/LocalSettings.scala b/project/LocalSettings.scala new file mode 100644 index 0000000000..de132b5689 --- /dev/null +++ b/project/LocalSettings.scala @@ -0,0 +1,13 @@ +package org.knora + +import sbt.* +import Keys.* + +// Uncomment L11 and skip-worktree on this file to make warnings non-fatal locally: +// git update-index --skip-worktree project/LocalSettings.scala + +object LocalSettings { + val localScalacOptions: Seq[SettingsDefinition] = Seq( + // scalacOptions -= "-Xfatal-warnings" + ) +}