New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Properly set the errored property for --report options #5079
Conversation
This sets the `errored` property (and thus the exit code) as long as any warning has severity "error", which includes warnings generated by --report options.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you think it is possible to add a test for this?
We have tests for different exit codes in https://github.com/stylelint/stylelint/blob/master/lib/__tests__/cli.test.js.
There are already tests in there that verify the exit codes for report flags: stylelint/lib/__tests__/cli.test.js Lines 242 to 255 in bf6a881
It's not clear to me why that wasn't failing prior to this PR, or how to write a test that wouldn't just recapitulate what that test is already doing. |
@nex3 @hudochenkov please rereview |
Tests look good to me, just need @vankop to approve the PR and I can land it. |
This sets the
errored
property (and thus the exit code) as long asany warning has severity "error", which includes warnings generated by
--report options.
Closes #5046