Make Compile Fail on Non-Exhaustive Match in SBT
You can add -Xfatal-warnings
to Scalac's options. That way any warning will be treated as an error.
In sbt, you can achieve that with:
scalacOptions += "-Xfatal-warnings"
Since scalac 2.13.2 there's a fairly granular control of warnings. To get what OP asks:
scalacOptions += "-Wconf:cat=other-match-analysis:error"
Detailed howto by Lukas Rytz.