-
Notifications
You must be signed in to change notification settings - Fork 528
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
CLI should provide a list of errors and exit with the appropriate exit code #221
Comments
Hey @BPScott so I've definitely got this in mind right now.. Once I've finished writing the rules that I have left on my plate this will be my next focus. I completely agree that proper error codes need to be implemented soon and functionality should mimic to a point other successful linters, I think our main focus at the moment is getting our rules and our original goal of supporting both the |
Hi @DanPurdy, indeed it's amazing to see sass-lint hurtling along at such a great pace. Figured I'd raise an issue just to make sure this doesn't get lost down the sofa tracked. Totally agree that beefing out the ruleset is top priority :) |
Ha thanks @BPScott we'll try and keep the pace up! 😄 |
I’m using this shell script as a work-around until sass-lint have proper exit status codes: SASS_LINT_OUTPUT=$(node_modules/.bin/sass-lint -v)
if [ -n "$SASS_LINT_OUTPUT" ]; then
echo "$SASS_LINT_OUTPUT"
exit 1
fi |
This should be closed, it was fixed in #458 |
|
@kmiyashiro also sass-lint doesn't provide the list of errors when run without arguments? |
Using Sass-lint 1.2.2.
I'd like to use the CLI for my development workflow, running sass-lint to check quality. I'd like to:
sass-lint
to exit with code 0 on success, and 1 if there are any errors.Currently I can either:
sass-lint -v
which throws an exception on the first error but does exit with code 1. This fails the first case but passes the second.sass-lint -vq
which provides a list of all errors, but always exits with code 0. This passes the first case but fails the secondNeither of which let me do what I'm hoping. I'm not sure what the best solution for this would be. Taking a quick look at eslint, when running it without options, they output the full list of issues every time, if sass-lint were to mimic this then the default action would be akin to currently running
sass-lint -qv
, but also providing the proper exit code.The text was updated successfully, but these errors were encountered: