forked from open-policy-agent/opa
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ast/parser: Detect function rule head + contains keyword.
Previously, we did not detect misuses of the `contains` keyword, which is only valid as a syntactic sugar for partial set definition rules. This commit adds some logic to detect when a function rule head has been paired with the `contains` keyword, which should generally be an error condition. Fixes: open-policy-agent#5525 Signed-off-by: Philip Conrad <philipaconrad@gmail.com>
- Loading branch information
1 parent
9a21f0e
commit 841c0ee
Showing
4 changed files
with
51 additions
and
1 deletion.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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