ec opa check

Check Rego source files== Synopsis

Check Rego source files for parse and compilation errors.

If the 'check' command succeeds in parsing and compiling the source file(s), no output
is produced. If the parsing or compiling fails, 'check' will output the errors
and exit with a non-zero exit code.
ec opa check <path> [path [...]] [flags]


-b, --bundle

load paths as bundle files or root directories (Default: false)


set capabilities version or capabilities.json file path

-f, --format

set output format (Default: pretty)

-h, --help

help for check (Default: false)


set file and directory names to ignore during loading (e.g., '.*' excludes hidden files) (Default: [])

-m, --max-errors

set the number of errors to allow before compilation fails early (Default: 10)


check for Rego v1 compatibility (policies must also be compatible with current OPA version) (Default: false)

-s, --schema

set schema file path or directory path

-S, --strict

enable compiler strict mode (Default: false)


opt-in to OPA features and behaviors that will be enabled by default in a future OPA v1.0 release (Default: false)

Options inherited from parent commands


same as verbose but also show function names and line numbers (Default: false)


path to the Kubernetes config file to use


less verbose output (Default: false)


max overall execution duration (Default: 5m0s)


enable trace logging (Default: false)


more verbose output (Default: false)