Skip to content

Commit

Permalink
chore: Add option to make warnings non-fatal locally. (#3044)
Browse files Browse the repository at this point in the history
  • Loading branch information
siers authored Feb 15, 2024
1 parent 52c798d commit 0d2367e
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
3 changes: 3 additions & 0 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import scala.language.postfixOps
import scala.sys.process.*

import org.knora.Dependencies
import org.knora.LocalSettings

//////////////////////////////////////
// GLOBAL SETTINGS
Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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",
Expand Down
13 changes: 13 additions & 0 deletions project/LocalSettings.scala
Original file line number Diff line number Diff line change
@@ -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"
)
}

0 comments on commit 0d2367e

Please sign in to comment.