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: use-if and use-contains #470

Merged
merged 1 commit into from
Nov 15, 2023
Merged

Rule: use-if and use-contains #470

merged 1 commit into from
Nov 15, 2023

Conversation

anderseknert
Copy link
Member

Recommend the use of if and contains when available as capabilities.

Some fixes to tests where we didn't live up to this standard ourselves. Great!

(Note that this is targeting the if-empty-object branch as that contained a few improvements that I wanted here, so that should be merged before this PR)

Fixes #468

@anderseknert anderseknert linked an issue Nov 13, 2023 that may be closed by this pull request
Base automatically changed from if-empty-object to main November 14, 2023 19:16
Copy link
Member

@charlieegan3 charlieegan3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, do we need to make any changes to implicit-future-keywords? (I.e to make it not apply when using regov1?)

@anderseknert
Copy link
Member Author

@charlieegan3 import rego.v1 has some issues in current version of OPA and is not included in the capabilities. That'll be fixed in v0.59.0, and then we need to think about what to recommend and at what time. But for now these can be unconditionally recommended.

Recommend the use of `if` and `contains` when available
as capabilities.

Some fixes to tests where we didn't live up to this
standard ourselves. Great!

Fixes #468

Signed-off-by: Anders Eknert <[email protected]>
@anderseknert anderseknert merged commit 660dc30 into main Nov 15, 2023
2 checks passed
@anderseknert anderseknert deleted the use-if-and-contains branch November 15, 2023 13:50
srenatus pushed a commit to srenatus/regal that referenced this pull request Oct 1, 2024
Recommend the use of `if` and `contains` when available
as capabilities.

Some fixes to tests where we didn't live up to this
standard ourselves. Great!

Fixes StyraInc#468

Signed-off-by: Anders Eknert <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Rule: use-if and use-contains
2 participants