-
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
Review Rego snippets in docs and update to follow current best practices #4599
Comments
Perhaps we could update the build step (or add a linting step) for docs to automatically search for rego blocks and diff those against the output of |
@johanfylling totally. unfortunately, there's another prereq to that: #4104 (now #4508) |
💭 Actually, we don't have to have |
This partially addresses open-policy-agent#4599. Signed-off-by: Torin Sandall <torinsandall@gmail.com>
This partially addresses open-policy-agent#4599. Signed-off-by: Torin Sandall <torinsandall@gmail.com>
This partially addresses #4599. Signed-off-by: Torin Sandall <torinsandall@gmail.com>
This partially addresses open-policy-agent#4599. Signed-off-by: Torin Sandall <torinsandall@gmail.com>
This issue has been automatically marked as inactive because it has not had any activity in the last 30 days. |
This eventually culminated into the Rego Style Guide. Having a mix of styles in the docs could actually be good, I think, as long as the recommended path is documented somewhere. Closing this for now, but if someone feels that there are some particular part of our docs that need an update, do holler out! |
Some things to consider for the review. Obviously up for discussion!
:=
for file level assignmentsfoo in bar
overfoo == bar[_]
orfoo[bar]
some foo in bar
overfoo := bar[_]
,some foo, bar in baz
overbar := baz[foo]
every foo in bar { .. }
over iteration with helper rulesAdditionally, we should use
opa fmt
for consistent formatting of snippets, and useopa check --strict
to catch mistakes (unless of course that's what's being demonstrated in a snippet).The text was updated successfully, but these errors were encountered: