运行 sbt 与 Wartremover

Running sbt with Wartremover

我想用 wartremover 和 sbt 检查我整个项目的代码。

我已将 addSbtPlugin("org.brianmckenna" % "sbt-wartremover" % "0.13" 添加到 plugins.sbt,但不知道下一步该做什么。

我没有从 wartremoversbt runsbt compile 获得任何输出。

the documentation 中所述,您需要配置 linter:

wartremoverErrors ++= Warts.unsafe

有了 sbt >= 0.13.5 和自动插件功能,仅此而已。添加上面的行后,示例出现编译错误。