title: make sbt build fail on scalastyle warnings
body: <p>I'm enforcing scalastyle check to my code space, referring <a href="http://www.scalastyle.org/sbt.html" rel="nofollow">http://www.scalastyle.org/sbt.html</a>.</p>
  
  <p>in build.sbt:</p>
  
  <pre><code>// scalastyle check
  lazy val compileScalastyle = taskKey[Unit]("compileScalastyle")
  compileScalastyle := org.scalastyle.sbt.ScalastylePlugin.scalastyle.in(Compile).toTask("").value
  (compile in Compile) &lt;&lt;= (compile in Compile) dependsOn compileScalastyle
  </code></pre>
  
  <p>in project/plugins.sbt:</p>
  
  <pre><code>addSbtPlugin("org.scalastyle" %% "scalastyle-sbt-plugin" % "0.8.0")
  </code></pre>
  
  <p>When I run <code>sbt compile</code>, scalastyle is generating <code>[warning] ***./utils/ConfigManager.scala: File must end with newline character</code>, but <strong>compile still succeeded</strong>.</p>
  
  <p>Is there a way to make <code>sbt compile</code> <strong>fail on scalastyle warnings</strong>?</p>
  
  <p>I just change all <code>&lt;check level="warning" ...&gt;</code> to be <code>&lt;check level="error" ...&gt;</code> in <code>scalastyleGenerateConfig</code>, I'm not sure this is the right way to do it.</p>
  
  <p>Thanks a lot</p>