NoWarn 不是 -Wunused 编译器错误的有效选择

NoWarn Is Not A Valid Choice for -Wunused Compiler Error

我将 sbt-toplecat 添加到我的存储库中,并用我的代码修复了大部分错误,但有一个问题我不确定如何修复:

'nowarn' is not a valid choice for '-Wunused'

我是 运行 Scala 2.13。我该如何解决这个错误?

nowarn is available from Scala 2.13.2. I am guessing you updated to sbt-tpolecat 0.1.12, which added this option in Add -Wunused:nowarn to 2.13 builds. #21

addSbtPlugin("io.github.davidgregory084" % "sbt-tpolecat" % "0.1.12")

但是将您的 Scala 版本保持在 2.13.1 或 2.13.0

scalaVersion := "2.13.1"

要解决此问题,请尝试将 Scala 版本更新到 2.13.2

scalaVersion := "2.13.2"