SimenB / stylint

Improve your Stylus code with Stylint
https://simenb.github.io/stylint/
GNU General Public License v2.0
348 stars 62 forks source link

Drop maxErrors #370

Open SimenB opened 7 years ago

SimenB commented 7 years ago

Always fail if any errors.

Keep around maxWarnings, so that if people want to lint something, but not necessarily fix it, just set it as warning instead.

Thoughts?

wojciechczerniak commented 7 years ago

Error is an error, you're right here. Should fail with correct status code if any. This way setting rules as error or warning would make sense, warnings may pass test. MaxWarnings reached can be an error too. Let's say we don't want to put build on hold with one or two minor mistakes but never allow to go this way too far and fix them asap. Valid use case?

BTW. I've always considered maxErrors as a way to not flood console with messages. This can have a hit on processor if it's a first run on larger code base. But maybe it's not a popular use case.

SimenB commented 7 years ago

We can just print the first 50, and say how many other there are, like flow does? That's orthogonal to this issue though 😄 Could you open a new issue? I'll add this to the project, feel free to implement it!

SimenB commented 7 years ago

We can add a --bail option to fail if a single file has errors?