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

Rule: constant conditions #82

Open
anderseknert opened this issue Apr 11, 2023 · 1 comment
Open

Rule: constant conditions #82

anderseknert opened this issue Apr 11, 2023 · 1 comment

Comments

@anderseknert
Copy link
Member

allow {
    1 == 1
    true
    false
}

And so on...

Note that we can't do much about a single true in an otherwise empty body, as:

allow := true

will be rewritten as:

allow = true {
    true
}

So we can accept that as an exception for now.

@anderseknert
Copy link
Member Author

This is mostly fixed with #96 , but we only do "top level" checks in rules with that, so I'm leaving this open hoping to come back to it later for checks in nestee expressions.

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

No branches or pull requests

1 participant