docs: Improve ground value and assignment docs#8047
Merged
charlieegan3 merged 1 commit intoopen-policy-agent:mainfrom Nov 12, 2025
Merged
docs: Improve ground value and assignment docs#8047charlieegan3 merged 1 commit intoopen-policy-agent:mainfrom
charlieegan3 merged 1 commit intoopen-policy-agent:mainfrom
Conversation
9e19ab0 to
a931b50
Compare
✅ Deploy Preview for openpolicyagent ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for openpolicyagent ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
johanfylling
approved these changes
Nov 12, 2025
| ### Assignment (`:=`) | ||
|
|
||
| The assignment operator (`:=`) is used to assign values to variables. Variables assigned inside a rule are locally scoped to that rule and shadow global variables. | ||
| The assignment operator `:=` is used to assign values to variables. Variables assigned inside a rule are locally scoped to that rule and shadow global variables. |
Contributor
There was a problem hiding this comment.
Should we add something about preferring this operator over unification where applicable?
Member
There was a problem hiding this comment.
We could say something about Regal being helpful here, possibly with a pointer to relevant rules :)
Contributor
Author
There was a problem hiding this comment.
There is small section just further down in the doc with both points.
I personally felt it was fine to put this note etc with the = operator since if they only read about := we're fine and that's ok for new users anyway.
Fixes open-policy-agent#6025 Signed-off-by: Charlie Egan <charlie_egan@apple.com>
a931b50 to
d0704eb
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #6025