Closed zgraggen closed 7 years ago
There isn't a way. Adding a scalastyleFailOnWarning would probably be the way to go. A PR would be great.
@matthewfarwell: Thanks for weighing in on this. Agreed PR would probably be best. Unfortunately, I have lot going on already. I'll see if I can find time to add that functionality...
+1 for adding this flag. Implementing the core functionality shouldn't be much to do, but I'm not familiar with debugging and writings tests for sbt plugins.
The reason why this feature can be useful is that otherwise all rules in the configuration will be upgraded to errors. The consequence is that IDEs will highlight style errors (former warnings) the same way as syntax errors.
I would like to have an option to fail the build on warning. Problem with bumping all warning to error on scalastyle_config.xml is that it makes Idea IntelliJ Scala plugin display all violations as straight error red. Normally, I would like to see it as warning inside IntelliJ.
I'm sorry if that has already been solved, but my google foo didn't reveal anything and I didn't get any response on the scala IRC channel either. I copied the description from this issue: https://github.com/scalastyle/scalastyle-sbt-plugin/issues/18 which describes exactly what I would like. I couldn't find if 'ngbinh' ever opened an issue as he said.