Skip to content

Conversation

darrendao
Copy link
Contributor

@darrendao darrendao commented Dec 15, 2022

This is similar to the existing parse_config and parse_config_file methods, but it'll work on combined config files instead.

With this, we can do something like this when unit testing rego files

test_parse_combined_config_files {
	count(violation) == 1 with input as parse_combined_config_files(["deployment.yaml", "service.yaml"])
}

Signed-off-by: Darren Dao [email protected]

This is similar to the existing parse_config and parse_config_file
methods, but it'll work on combined config files instead.

Signed-off-by: Darren Dao <[email protected]>
@jpreese
Copy link
Member

jpreese commented Dec 19, 2022

This makes sense to me. Thanks for your contribution! 🎉

@jpreese jpreese merged commit 03626f5 into open-policy-agent:master Dec 19, 2022
@tonglil
Copy link

tonglil commented Jun 16, 2025

Would really appreciate a function like this to parse a directory, vs specifying individual files!

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.

3 participants