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

docs: Include part of grammar is incorrect #4689

Closed
mmzeeman opened this issue May 15, 2022 · 1 comment · Fixed by #4690
Closed

docs: Include part of grammar is incorrect #4689

mmzeeman opened this issue May 15, 2022 · 1 comment · Fixed by #4690
Labels

Comments

@mmzeeman
Copy link
Contributor

Include part of grammar is wrong

https://www.openpolicyagent.org/docs/latest/policy-reference/#grammar

Defines import rules as:

module  = package { import } policy
package = "package" ref
import  = "import" package [ "as" var ]

Which means that include rules should look like this:

package test.package

import package test.include 

...

But in practice the package part is always omitted.

Should the import rule be import = "import" ref [ "as" var ] instead?

@mmzeeman mmzeeman added the bug label May 15, 2022
@mmzeeman mmzeeman changed the title docs: Include part of grammar is not correct docs: Include part of grammar is incorrect May 15, 2022
@srenatus
Copy link
Contributor

There's no such thing as import package data.foo. I think the grammar is just wrong. Would you be up to fixing it in a PR? Your suggestion seems alright 👍

srenatus pushed a commit that referenced this issue May 15, 2022
`Package` should be `ref`.

Fixes #4689.

Signed-off-by: Maas-Maarten Zeeman <mmzeeman@xs4all.nl>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants