From ea9cc23915642cd43f7328356f91e579818c3376 Mon Sep 17 00:00:00 2001 From: mvelimir Date: Mon, 22 Aug 2022 11:04:23 +0200 Subject: [PATCH] Add -Ywarn-unused scalac option for OrganizeImports.removeUnused scalafix rule --- project/BuildHelper.scala | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/project/BuildHelper.scala b/project/BuildHelper.scala index b11f1bf57..897c859f8 100644 --- a/project/BuildHelper.scala +++ b/project/BuildHelper.scala @@ -12,7 +12,7 @@ object BuildHelper { name := s"$prjName", crossScalaVersions := List(Scala212, Scala213), ThisBuild / scalaVersion := Scala213, - scalacOptions := stdOptions, + scalacOptions := stdOptions ++ extraOptions, semanticdbEnabled := true, semanticdbOptions += "-P:semanticdb:synthetics:on", semanticdbVersion := scalafixSemanticdb.revision, @@ -23,6 +23,9 @@ object BuildHelper { autoAPIMappings := true ) + private val extraOptions = + List("-Ywarn-unused") + private val stdOptions = List("-deprecation", "-encoding", "UTF-8", "-feature", "-unchecked", "-Xfatal-warnings")