Skip to content

Commit

Permalink
Tell Scala Compiler to emit warning for unused
Browse files Browse the repository at this point in the history
  • Loading branch information
Friendseeker committed Oct 18, 2024
1 parent 41dd74e commit 43bbec1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ def baseSettings: Seq[Setting[?]] = Seq(
testFrameworks += new TestFramework("verify.runner.Framework"),
compile / javacOptions ++= Seq("-Xlint", "-Xlint:-serial"),
Test / publishArtifact := false,
scalacOptions ++= Seq("-Wunused:all"),
scalacOptions ++= Seq("-YdisableFlatCpCaching"),
scalacOptions += {
scalaBinaryVersion.value match {
Expand Down Expand Up @@ -468,7 +469,7 @@ lazy val compilerBridge = (projectMatrix in internalPath / "compiler-bridge")
baseSettings,
compilerVersionDependentScalacOptions,
// We need this for import Compat._
Compile / scalacOptions --= Seq("-Ywarn-unused-import", "-Xfatal-warnings"),
Compile / scalacOptions --= Seq("-Ywarn-unused-import", "-Xfatal-warnings", "-Wunused:all"),
Compile / scalacOptions ++= (scalaVersion.value match {
case VersionNumber(Seq(2, 12, _*), _, _) =>
List("-Ywarn-unused:-imports,-locals,-implicits,-explicits,-privates")
Expand Down

0 comments on commit 43bbec1

Please sign in to comment.