-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
rego.v1
enforces if
before chained rule bodies, not allowed by parser
#6370
Comments
Three possible solutions:
p if {
input.x == 1
} if {
input.x == 2
} as the added
|
If we believe it's a commonly used pattern, would option |
Agreed — since the purpose of chained bodies is likely compactness, I feel like it's fine to only require |
Alright, so far it looks like no 1 has it 👍. |
Fixes: open-policy-agent#6370 Signed-off-by: Johan Fylling <[email protected]>
Fixes: #6370 Signed-off-by: Johan Fylling <[email protected]>
The policy:
will produce error:
However, updating the policy by adding an
if
to the second body:will produce error:
The text was updated successfully, but these errors were encountered: