scalastyle / scalastyle-sbt-plugin

scalastyle-sbt-plugin
Apache License 2.0
139 stars 52 forks source link

equivalent of fatal warnings #18

Closed fommil closed 6 years ago

fommil commented 10 years ago

perhaps with the ability to toggle specific style checks on a per-class basis.

this would enable teams with CI to automatically enforce standards in pull requests.

matthewfarwell commented 9 years ago

What is the difference between error and fatal?

fommil commented 9 years ago

With the setting enabled, the compiler bumps warnings to errors.

matthewfarwell commented 9 years ago

Ok, so if I set this flag, and I had a warning, then this would automatically be bumped to an error. Given that when you have errors, and scalastyleFailOnError is set to true, the scalastyle task fails, what more does this give me?

fommil commented 9 years ago

selectively bump warnings to errors, so that the build cannot pass if the warts are in the code (but allowing the project to define what constitutes a build failure. i.e. not just "anything")

ngbinh commented 9 years ago

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.

matthewfarwell commented 9 years ago

@ngbinh That is a slightly different issue, and it is easy enough to add. We have very similar functionality in the maven plugin - failOnWarning. Do you want to submit another issue & a PR?

ngbinh commented 9 years ago

@matthewfarwell sure. Will look into another issue and PR.