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

Forbid duplicate keys in strict mode #121

Merged
merged 2 commits into from
Jul 15, 2022

Conversation

bilbof
Copy link
Contributor

@bilbof bilbof commented Jul 15, 2022

Prevents specifying duplicate keys using
UnmarshallStrict: https://pkg.go.dev/gopkg.in/yaml.v2#UnmarshalStrict

Prevents specifying duplicate keys using
UnmarshallStrict: https://pkg.go.dev/gopkg.in/yaml.v2#UnmarshalStrict
@yannh
Copy link
Owner

yannh commented Jul 15, 2022

Loving that :) Think you could add a simple acceptance tests to show it failing here? https://github.com/yannh/kubeconform/blob/master/acceptance.bats

@bilbof bilbof force-pushed the bf/duplicate-keys-strict-mode branch from 032f0a8 to 937f6f4 Compare July 15, 2022 10:42
@bilbof
Copy link
Contributor Author

bilbof commented Jul 15, 2022

@yannh absolutely -- I've added acceptance tests.

@yannh
Copy link
Owner

yannh commented Jul 15, 2022

Looks like a nice addition, thanks!

@yannh yannh merged commit 9a6fff1 into yannh:master Jul 15, 2022
@bilbof bilbof deleted the bf/duplicate-keys-strict-mode branch July 15, 2022 12:24
@bilbof
Copy link
Contributor Author

bilbof commented Jul 15, 2022

Awesome, thanks for the quick approve/merge 👍

yannh pushed a commit that referenced this pull request Oct 16, 2022
* Forbid duplicate keys in strict mode

Prevents specifying duplicate keys using
UnmarshallStrict: https://pkg.go.dev/gopkg.in/yaml.v2#UnmarshalStrict

* Add acceptance tests for duplicated properties
yannh pushed a commit that referenced this pull request Oct 16, 2022
* Forbid duplicate keys in strict mode

Prevents specifying duplicate keys using
UnmarshallStrict: https://pkg.go.dev/gopkg.in/yaml.v2#UnmarshalStrict

* Add acceptance tests for duplicated properties
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.

2 participants