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

Extend redundant-existence-checkto include := x if x #935

Closed
anderseknert opened this issue Jul 23, 2024 · 0 comments · Fixed by #949
Closed

Extend redundant-existence-checkto include := x if x #935

anderseknert opened this issue Jul 23, 2024 · 0 comments · Fixed by #949
Labels
enhancement New feature or request rule

Comments

@anderseknert
Copy link
Member

Something like

package p

import rego.v1

x := input.x if input.x

can, and should be, simplified to just

package p

import rego.v1

x := input.x
@anderseknert anderseknert added enhancement New feature or request rule labels Jul 23, 2024
anderseknert added a commit that referenced this issue Jul 29, 2024
Fixes #935

Signed-off-by: Anders Eknert <anders@styra.com>
anderseknert added a commit that referenced this issue Jul 30, 2024
Also add end location to this rule's report

Fixes #935

Signed-off-by: Anders Eknert <anders@styra.com>
charlieegan3 pushed a commit that referenced this issue Jul 30, 2024
Also add end location to this rule's report

Fixes #935

Signed-off-by: Anders Eknert <anders@styra.com>
anderseknert added a commit that referenced this issue Jul 30, 2024
Also add end location to this rule's report

Fixes #935

Signed-off-by: Anders Eknert <anders@styra.com>
srenatus pushed a commit to srenatus/regal that referenced this issue Oct 1, 2024
…aInc#949)

Also add end location to this rule's report

Fixes StyraInc#935

Signed-off-by: Anders Eknert <anders@styra.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request rule
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant