reviewdog / action-stylelint

Run stylelint with reviewdog
https://github.com/marketplace?type=actions&query=reviewdog
MIT License
46 stars 24 forks source link

Check the `stylelint` exit code before proceeding #118

Closed davidcornu closed 7 months ago

davidcornu commented 7 months ago

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 https://github.com/reviewdog/action-stylelint/issues/116).

https://github.com/reviewdog/action-stylelint/pull/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 commented 7 months ago

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

davidcornu commented 7 months ago

@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

review-dog commented 7 months ago

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!

github-actions[bot] commented 7 months ago

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