Skip to content

How to validate yaml file in v4 to make sure there are no duplicate keys? #1207

Answered by mikefarah
shreyaspurohit asked this question in Q&A
Discussion options

You must be logged in to vote

No sorry - the underlying parser slurps up the yaml file - and (from memory) it will use the latest value for the key. yq doesn't have a way of knowing that it was duplicated.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by shreyaspurohit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants