Reputation: 545
I want to "ban" some or all compiler warnings.
Upvotes: 29
Views: 7007
Reputation: 12788
Per the scalac options documentation, you can pass either -Werror
or -Xfatal-warnings
.
You can do that in sbt by appending to scalacOptions
.
scalacOptions += "-Werror"
Upvotes: 3
Reputation: 1186
You can pass options from sbt to the scala compiler, including the one that turns warnings into errors.
I usually add these:
scalacOptions ++= Seq("-unchecked", "-deprecation", "-feature", "-Xfatal-warnings"),
Upvotes: 37
Reputation: 8601
Take a look at fatal-warnings scalac flag.
Source: https://groups.google.com/forum/?fromgroups=#!topic/simple-build-tool/RcDnib_EGL4
Upvotes: 0