From 43bbec10ffbaff3d4bb7c6b0942e981d9c7ac2cb Mon Sep 17 00:00:00 2001 From: friendseeker <66892505+Friendseeker@users.noreply.github.com> Date: Fri, 18 Oct 2024 01:49:28 -0700 Subject: [PATCH] Tell Scala Compiler to emit warning for unused --- build.sbt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index 476898113..635517c7e 100644 --- a/build.sbt +++ b/build.sbt @@ -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 { @@ -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")