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

[Feature] CLI option for exit code 0 only for hint errors or webhint failures #4381

Open
masi opened this issue Mar 10, 2021 · 1 comment
Open

Comments

@masi
Copy link

masi commented Mar 10, 2021

🚀 Feature request

Description

I would like to make webhint exit with a non-zero exit code only when either at least one hint has the severity "error" or webhint has a failure condition so it cannot run all tests.

The icing would be to set up a minimum severity to trigger a non-zero exit code, eg warning.

What scenarios will this solve?

In a CI I don't have to disable low severity hints completely to have a CI step pass or make the step pass regardless of the results of the webhint's run.

@molant
Copy link
Member

molant commented Mar 11, 2021

I'm looking at the code and by default the CLI should be exiting with non-zero when there are at least 1 error. What is the configuration that you are using? Maybe we are overriding it in there?

I think you can do what you want by using the severityThreshold property in your .hintrc. I'm not sure why it's not documented in the website though (probably my bad as I was the one implementing that feature 😓)

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

No branches or pull requests

2 participants