Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: pretty print the built-in err structure #839

Merged
merged 1 commit into from
Jul 1, 2023

Conversation

boranx
Copy link
Member

@boranx boranx commented Jul 1, 2023

this is to fix the linter issue reported in the dependabot PR: https://github.com/open-policy-agent/conftest/actions/runs/5425401141/jobs/9866098968?pr=838
Also, it pretty prints the whole array structure, perhaps better than using %s

e.g

./conftest test -p examples/builtin-errors/invalid-dns.rego examples/kubernetes/deployment.yaml
Error: running test: query rule: check: query rule: built-in error: [{Code:eval_builtin_error Message:net.lookup_ip_addr: lookup not-real-domain.xyz: no such host Location:examples/builtin-errors/invalid-dns.rego:4}]

Signed-off-by: boranx <boran.seref@gmail.com>
@boranx boranx merged commit d61f6e3 into open-policy-agent:master Jul 1, 2023
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant