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: inconsistent-rule-type #601

Open
anderseknert opened this issue Mar 14, 2024 · 0 comments
Open

Rule: inconsistent-rule-type #601

anderseknert opened this issue Mar 14, 2024 · 0 comments

Comments

@anderseknert
Copy link
Member

Yeah, the name could certainly use some further thought, but the idea is to flag when different types are used in the rule head assignment. Simple example to demonstrate:

package p

import rego.v1

default hello := false

hello := "world" if input.message == "world"

I suppose there could be cases where this is desired (and ignore directives can be used), but in almost all cases it's likely a mistake.

@anderseknert anderseknert added bug Something isn't working rule category/bugs and removed bug Something isn't working labels Mar 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: TODO
Development

No branches or pull requests

1 participant