-
Notifications
You must be signed in to change notification settings - Fork 35
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-rego-v1
#538
Rule: use-rego-v1
#538
Conversation
docs/rules/imports/use-rego-v1.md
Outdated
```rego | ||
package policy | ||
|
||
# before OPA v0.59.0, this is alright |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# before OPA v0.59.0, this is alright | |
# before OPA v0.59.0, this was best practice |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Fixed.
docs/rules/imports/use-rego-v1.md
Outdated
## Rationale | ||
|
||
OPA [v0.59.0](https://github.com/open-policy-agent/opa/releases/tag/v0.59.0) introduced a new `rego.v1` import, which | ||
allows policy authors to prepare for language changes coming in a future OPA 1.0 release. Some notable changes include: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
allows policy authors to prepare for language changes coming in a future OPA 1.0 release. Some notable changes include: | |
allows policy authors to prepare for language changes coming in the future OPA 1.0 release. Some notable changes include: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed 👍
```shell | ||
$ regal lint bundle | ||
131 files linted. No violations found. 1 rule skipped: | ||
- use-rego-v1: Missing capability for `import rego.v1` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is really nice!
Recommend using `import rego.v1`. Also: * Ignore `import future` rules when `rego.v1` rule in capabilities * Update the documentation for all rules to use the `rego.v1` import * Update all Rego used in tests to use `rego.v1` import Signed-off-by: Anders Eknert <anders@styra.com>
5eabcd0
to
e8b328d
Compare
Recommend using `import rego.v1`. Also: * Ignore `import future` rules when `rego.v1` rule in capabilities * Update the documentation for all rules to use the `rego.v1` import * Update all Rego used in tests to use `rego.v1` import Signed-off-by: Anders Eknert <anders@styra.com>
Recommend using
import rego.v1
.Also:
import future
rules whenrego.v1
rule in capabilitiesrego.v1
importrego.v1
import