mirror of
https://github.com/open-policy-agent/opa.git
synced 2026-08-12 19:32:48 -06:00
40dd2b90d2
Follow-up to #8900. Moves the gzip encoding and decoding config validation off the Go `validateAndInjectDefaults` methods and onto embedded Rego policies, injecting defaults and reporting value errors. Each config registers its recognized options via `config.RegisterConfigSpec` so unknown-option warnings live with the owning struct. Field type validation stays in the Go decode step. --------- Signed-off-by: Sebastian Spaink <sebastianspaink@gmail.com>
31 lines
644 B
YAML
31 lines
644 B
YAML
ignore:
|
|
files:
|
|
- "docs/*"
|
|
- "**/test/*"
|
|
- "**/testdata/*"
|
|
- "**/testfiles/*"
|
|
|
|
rules:
|
|
idiomatic:
|
|
directory-package-mismatch:
|
|
exclude-test-suffix: true
|
|
ignore:
|
|
files:
|
|
- "docs"
|
|
- "internal/wasm/sdk/examples/*"
|
|
- "v1/config/*.rego"
|
|
- "internal/configpolicy/*.rego"
|
|
- "internal/metricsexport/*.rego"
|
|
- "v1/plugins/server/metrics/*.rego"
|
|
- "v1/plugins/server/encoding/*.rego"
|
|
- "v1/plugins/server/decoding/*.rego"
|
|
style:
|
|
line-length:
|
|
ignore:
|
|
files:
|
|
- "docs"
|
|
|
|
project:
|
|
roots:
|
|
- build/policy
|