cedar-policy / cedar

Implementation of the Cedar Policy Language
https://www.cedarpolicy.com
Apache License 2.0
892 stars 80 forks source link

Add methods to get number of policies and templates in a PolicySet #1180

Closed jv-garcia closed 2 months ago

jv-garcia commented 2 months ago

Description of changes

Add methods to get number of policies and templates in a PolicySet.

Regarding unit testing, I decided to just reuse this API in previous places where the size of existing iterators are used, it feels like more effort would feel silly here.

Issue #, if available

1179

Checklist for requesting a review

The change in this PR is (choose one, and delete the other options):

I confirm that this PR (choose one, and delete the other options):

I confirm that cedar-spec (choose one, and delete the other options):

jv-garcia commented 2 months ago

One of the checks failed, is this a known issue? I'd probably need a bit of help to fix it if needed.

cdisselkoen commented 2 months ago

It's a problem unrelated to the change in this PR. Given that, happy to merge this now -- looks like we have 2 approvals and the CI failures are unrelated.