Closed danijeld closed 7 years ago
It should already: https://github.com/rossPatton/stylint/commit/aa0e1890b4a69b39d93591e036eb38cb23263208#diff-6081bb8ff8dbece71ba61504af4ec274
What version are you using?
Stylint version: 1.5.6
Here is a list of commands I ran to validate this.
File without issues:
vagrant@vagrant-ubuntu-trusty-64:$ stylint src/ vagrant@vagrant-ubuntu-trusty-64:$ echo $? 0
After introducing errors: vagrant@vagrant-ubuntu-trusty-64:$ stylint src/ src/views/Settings/settings.styl 48:7 warning property is not valid valid
Stylint: 0 Errors. Stylint: 1 Warnings. vagrant@vagrant-ubuntu-trusty-64:$ echo $? 0
It always returns 0.
If maxErrors
is set, the amount must be more than that. You example has a warning, and unless maxWarnings
is set, warnings will always exit cleanly. See the logic in getExitCode
from the diff I pasted in my last commnet
@danijeld Closing this, please ping me if you still have an issue with this.
Can we please have stylint return 0 if no errors are found and 1 if errors are found after it executes?