Skip to content

Commit

Permalink
Review modifications suggested by @ashutosh-narkar
Browse files Browse the repository at this point in the history
* 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>
  • Loading branch information
johanfylling committed Dec 20, 2023
1 parent e9ff76c commit 839fe01
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions docs/content/opa-1.md
Expand Up @@ -226,11 +226,11 @@ OPA can be run in 1.0 compatibility mode by using the `--v1-compatible` flag. Wh

The `--v1-compatible` flag is currently supported on the following commands:

* `build`
* `check`*
* `fmt`*
* `eval`
* `test`
* `build`: requires modules to be compatible with OPA v1.0 syntax
* `check`*: requires modules to be compatible with OPA v1.0 syntax
* `fmt`*: formats modules to be compatible with OPA v1.0 syntax, but not the current 0.x syntax.
* `eval`: requires modules to be compatible with OPA v1.0 syntax
* `test`: requires modules to be compatible with OPA v1.0 syntax

Note: the `check` and `fmt` commands also support the `--rego-v1` flag, which will check/format Rego modules as if compatible with the Rego syntax of _both_ the current 0.x OPA version and OPA v1.0.
If both flags are used at the same time, `--rego-v1` takes precedence over `--v1-compatible`.
Expand Down

0 comments on commit 839fe01

Please sign in to comment.