Open johanfylling opened 2 months ago
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.
A PR would be welcome ;)
@johanfylling is there a capability to read for this? Regal already provides the option to provide capabilities via config, so that'd be a convenient way of doing it.
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).