-
Notifications
You must be signed in to change notification settings - Fork 297
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rules returning a boolean (no msg) #864
Comments
Hi Apparently, as you mentioned, it considers the result only for the forms deny_no_msg2 = true {
false # OR not.input.data.field
} If it's a need, we'd welcome a PR addressing the issue with the changes you pointed out above |
@boranx, the example you provided does not cause a failure. conftest reports it as passed. I don't have a use case for using a rule that returns just a boolean, but it is quite surprising that it always passes. It is certainly a pitfall for users. |
Hello 馃憢
Are Rego rules without the
msg
, e.g. ones returning a boolean supported?Given this Rego rule:
When I run
conftest test input.json --all-namespaces
I get:I was expecting that the
*_no_msg
rules that matched would also appear in the output. Perhaps something like:I'm looking at the comment here, and I'm not certain that what is stated there is correct, the
*_no_msg
rules above did returntrue
but were counted towards successes.Perhaps the rules returning a boolean
true
could be considered, for example using something like:The text was updated successfully, but these errors were encountered: