Skip to content

Fix nested inline YAML merge explode#2699

Open
cyphercodes wants to merge 1 commit intomikefarah:masterfrom
cyphercodes:cyphercodes/fix-2679-nested-inline-merge-explode
Open

Fix nested inline YAML merge explode#2699
cyphercodes wants to merge 1 commit intomikefarah:masterfrom
cyphercodes:cyphercodes/fix-2679-nested-inline-merge-explode

Conversation

@cyphercodes
Copy link
Copy Markdown
Contributor

Summary

  • Resolve nested merge keys in inline merge maps before filtering merged keys.
  • Add a regression test for explode(.) with {<<: {<<: {a: 42}}}.

Fixes #2679.

Tests

  • go test ./pkg/yqlib -run TestAnchorAliasOperatorAlignedToSpecScenarios -count=1
  • go test ./pkg/yqlib -run 'TestAnchorAliasOperator(AlignedToSpec)?Scenarios' -count=1\n- printf '%s\\n' '{<<: {<<: {a: 42}}}' | go run . --yaml-fix-merge-anchor-to-spec 'explode(.)'\n- go test ./pkg/yqlib -count=1\n- go test ./...\n- ./scripts/check.sh\n- ./scripts/spelling.sh\n- git diff --check

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.

Nested merge key with inline map broken

1 participant