mirror of
https://github.com/open-policy-agent/opa.git
synced 2026-08-12 19:32:48 -06:00
38c2f0c5e0
* ast+cmd+rego: Adding `--rego-v1` flag to `opa eval` Fixes: #6463 Signed-off-by: Johan Fylling <johan.dev@fylling.se> * Adding `--rego-v1` flag to `opa build` Fixes: #6463 Signed-off-by: Johan Fylling <johan.dev@fylling.se> * Formatting PE support modules to comply with rego-v1 when required Signed-off-by: Johan Fylling <johan.dev@fylling.se> * Removing rego.v1 import when formatting for rego-v1 (not rego-v0-compat-v1) Signed-off-by: Johan Fylling <johan.dev@fylling.se> * touch up Signed-off-by: Johan Fylling <johan.dev@fylling.se> * Fixing linting issues Signed-off-by: Johan Fylling <johan.dev@fylling.se> * Consolidating `Bundle.FormatModules()` and `Bundle.FormatModulesForRegoVersion()` Suggested by @ashutosh-narkar Signed-off-by: Johan Fylling <johan.dev@fylling.se> * Adding descriptions to `RegoVersion` Requested by @ashutosh-narkar Signed-off-by: Johan Fylling <johan.dev@fylling.se> * Using `--v1-compatible` flag instead of `--rego-v1` Signed-off-by: Johan Fylling <johan.dev@fylling.se> * Updating docs Signed-off-by: Johan Fylling <johan.dev@fylling.se> * Reintroducing `ParserOptions.RegoV1Compatible` to avoid breaking change Signed-off-by: Johan Fylling <johan.dev@fylling.se> * cmd & tester Adding `--v1-compatible` flag to `opa test` Fixes: #6463 Signed-off-by: Johan Fylling <johan.dev@fylling.se> * Adding `--v1-compatible` flag to `opa fmt` Fixes: #6463 Signed-off-by: Johan Fylling <johan.dev@fylling.se> * Adding `--v1-compatible` flag to `opa check` Fixes: #6463 Signed-off-by: Johan Fylling <johan.dev@fylling.se> * Making linter happy Signed-off-by: Johan Fylling <johan.dev@fylling.se> * Review modifications suggested by @ashutosh-narkar * Changing `ParserOptions.RegoV1Compatible` take precedence over `ParserOptions.RegoVersion` * Fixing comment in test * Updating `fmt --rego-v1` CLI description Signed-off-by: Johan Fylling <johan.dev@fylling.se> * Review modifications suggested by @ashutosh-narkar * Changing `ParserOptions.RegoV1Compatible` take precedence over `ParserOptions.RegoVersion` * Fixing comment in test * Updating `fmt --rego-v1` CLI description * Adding back `Opts.RegoV1` and deprecating. * Making `Opts.RegoV1` take precedence over `Opts.RegoVersion` Signed-off-by: Johan Fylling <johan.dev@fylling.se> * Review modifications suggested by @ashutosh-narkar * Changing `ParserOptions.RegoV1Compatible` take precedence over `ParserOptions.RegoVersion` * Fixing comment in test * Updating `fmt --rego-v1` CLI description * Adding back `Opts.RegoV1` and deprecating. * Making `Opts.RegoV1` take precedence over `Opts.RegoVersion` * `TestPartialWitRegoV1` -> `TestPartialWithRegoV1` Signed-off-by: Johan Fylling <johan.dev@fylling.se> * Review modifications suggested by @ashutosh-narkar * Changing `ParserOptions.RegoV1Compatible` take precedence over `ParserOptions.RegoVersion` * Fixing comment in test * Updating `fmt --rego-v1` CLI description * Adding back `Opts.RegoV1` and deprecating. * Making `Opts.RegoV1` take precedence over `Opts.RegoVersion` * `TestPartialWitRegoV1` -> `TestPartialWithRegoV1` * removing `Println` in test Signed-off-by: Johan Fylling <johan.dev@fylling.se> * Review modifications suggested by @ashutosh-narkar * Changing `ParserOptions.RegoV1Compatible` take precedence over `ParserOptions.RegoVersion` * Fixing comment in test * Updating `fmt --rego-v1` CLI description * Adding back `Opts.RegoV1` and deprecating. * Making `Opts.RegoV1` take precedence over `Opts.RegoVersion` * `TestPartialWitRegoV1` -> `TestPartialWithRegoV1` * removing `Println` in test * Updating docs with per-command behavioural descriptions for `--v1-compatible`. Signed-off-by: Johan Fylling <johan.dev@fylling.se> --------- Signed-off-by: Johan Fylling <johan.dev@fylling.se>