Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Add option to make warnings non-fatal locally. #3044

Merged
merged 2 commits into from
Feb 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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"
)
}