Skip to content
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

Check the stylelint exit code before proceeding #118

Merged
merged 1 commit into from
Feb 8, 2024
Merged

Check the stylelint exit code before proceeding #118

merged 1 commit into from
Feb 8, 2024

Conversation

davidcornu
Copy link
Contributor

@davidcornu davidcornu commented Feb 8, 2024

Since the update to using JSON output, errors with stylelint have been hard to diagnose as the error message outputted relates to reviewdog's failure to parse the output rather than the error itself (see #116).

#114 likely doesn't help in this regard.

This PR checks the stylelint exit code and prints out its output if there was an error instead of passing the output to reviewdog.

@bert-mccutchen
Copy link
Contributor

Love it. Looks like Stylelint's return code is dependent on if there are linter errors and not if the process itself failed. 😆

@davidcornu
Copy link
Contributor Author

davidcornu commented Feb 8, 2024

@bert-mccutchen it looks like the exit codes are documented here https://stylelint.io/user-guide/cli/#exit-codes

I'll update this PR to only continue if we see a 0 (everything fine) or 2 (lint error) code

@bert-mccutchen bert-mccutchen merged commit eadef3f into reviewdog:master Feb 8, 2024
5 checks passed
@davidcornu davidcornu deleted the david/check-stylelint-exit-code branch February 8, 2024 21:02
@review-dog
Copy link
Member

Hi, @davidcornu! We merged your PR to reviewdog! 🐶
Thank you for your contribution! ✨

We just invited you to join the @reviewdog organization on GitHub.
Accept the invite by visiting https://github.com/orgs/reviewdog/invitation.
By joining the team, you'll be a part of reviewdog community and can help the maintenance of reviewdog.

Thanks again!

Copy link
Contributor

github-actions bot commented Feb 8, 2024

🚀 [bumpr] Bumped! New version:v1.22.1 Changes:v1.22.0...v1.22.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants