-
Notifications
You must be signed in to change notification settings - Fork 307
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
Fail on warn should exit with different rc #300
Comments
I like the idea. What exit codes would you propose? |
IMHO the most intuitive rc 0 OK 1 WARN (with no errors) 2 ERROR (and error+warn), or leave some place for other future levels, but this may cause backward compatibility if someone is using the current return code (and I don't see a reason for using ==1 and not !=0, but if you think there is so 1 error 2 warn). |
@nirroz93 I'd be curious about your use case. I'm not necessarily opposed to providing more information to the user about the results, but admittedly I do like the current behavior. Without With |
@jpreese In the current state I need to catch the output and parse it (or run conftest twice). |
When possible, I like to mimic the behavior of OPA. I feel the experience shouldn't diverge too much, because contest just builds onto all the niceties that OPA provides. That said, in their I would agree with you @nirroz93 that the best course of action would most likely be: (without (with I would suspect most CI checks for != 0, so this has low impact to breaking current implementations, gives you the data you need, and is at least somewhat in line with OPA. |
Resolved via #378 |
Hi!
Currently, running conftest test --fail-on-warn return 1 when there is a warning or an error.
Different return code when there are no errors (just warn) will be nice and, for me, it seems like the "normal" behaviour (meaning: when I was surprised it didn't :-) )
The text was updated successfully, but these errors were encountered: