【问题标题】:How to see all the warnings in SBT 0.11?如何查看 SBT 0.11 中的所有警告?
【发布时间】:2012-03-14 00:43:34
【问题描述】:

当我使用 SBT 0.11 编译我的 Scala 项目时,我收到有关“未检查”警告的通知,但我看不到警告本身。

我看到的是

[warn] there were 8 unchecked warnings; re-run with -unchecked for details
[warn] one warning found

我究竟应该“使用 -unchecked 重新运行”什么以及如何做到这一点? compile -uncheckedcompile uncheckedxsbt -unchecked 似乎都不起作用。

【问题讨论】:

    标签: scala warnings sbt


    【解决方案1】:

    我找到了答案here

    解决办法是添加

    scalacOptions ++= Seq("-unchecked", "-deprecation")
    

    到项目的build.sbt 文件。

    它也可以将“-feature”作为一个选项并与 sbt 0.13 一起使用

    【讨论】:

      猜你喜欢
      • 2013-01-14
      • 2015-06-29
      • 2019-02-10
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-01-17
      • 1970-01-01
      相关资源
      最近更新 更多