You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using the --v1-compatible flag with OPA, it'll behave exactly as v1.0 OPA. Meaning a Rego file isn't required to use the rego.v1 and future.keywords imports; e.g.:
package demo
p contains "Hello" if {
input.x ==2
}
It'd be nice if Regal could be somehow instructed to deal with such files without errors or warnings.
One possible, non-obtrusive solution that would work with at least a subset of Rego projects would be to pick up the .manifest file in the workspace, and read the rego_version and file_rego_versions attributes (will be available in OPA v0.64.0).
The text was updated successfully, but these errors were encountered:
Adding a --v1-compatible flag to regal lint seems easy enough, so let's do that. Looking for a .manifest file and use that seems like a good idea too if that's what OPA will be doing, and we can probably borrow some logic around that from OPA directly.
When using the
--v1-compatible
flag with OPA, it'll behave exactly as v1.0 OPA. Meaning a Rego file isn't required to use therego.v1
andfuture.keywords
imports; e.g.:It'd be nice if Regal could be somehow instructed to deal with such files without errors or warnings.
One possible, non-obtrusive solution that would work with at least a subset of Rego projects would be to pick up the
.manifest
file in the workspace, and read therego_version
andfile_rego_versions
attributes (will be available in OPA v0.64.0).The text was updated successfully, but these errors were encountered: