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

Add exit codes #12

Merged
merged 2 commits into from
Dec 14, 2017
Merged

Add exit codes #12

merged 2 commits into from
Dec 14, 2017

Conversation

jo-sm
Copy link
Owner

@jo-sm jo-sm commented Dec 12, 2017

This adds support for exit codes, similarly to the stylelint CLI.

The original stylelint CLI supports 4 exit codes:

1: Something unknown went wrong.
2: At least one rule with an "error"-level severity triggered at least one violations.
78: There was some problem with the configuration file.
80: A file glob was passed, but it found no files.

This pull request adds 5 new exit codes, from 1 to 5, and simplifies the exit codes that are present in stylelint:

  1. A catch all for all unknown errors that occur within stylelint_d, such as invalid JSON or internal messages being sent from the server instance to the client.
  2. When the CSS file contains an error (not just a warning).
  3. The configuration file has an issue (stylelint code 78).
  4. A file glob was passed but had no files (stylelint code 80).
  5. A catch all for other error codes sent from stylelint itself.

Thanks to @Mukimov for this idea!

@mufasa71
Copy link

@jo-sm Thanks, looks great!

@jo-sm jo-sm merged commit b04a89e into master Dec 14, 2017
jo-sm added a commit that referenced this pull request Sep 25, 2019
@jo-sm jo-sm deleted the exit-codes branch September 10, 2020 16:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants