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

fix: do not report duplicate keys errors for keys added by merge keys #25

Merged
merged 2 commits into from
Sep 17, 2019

Conversation

P0lip
Copy link
Contributor

@P0lip P0lip commented Sep 16, 2019

ignoreDuplicateKeys: false,
});

expect(result.diagnostics).toEqual([]);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@P0lip In order to protect this from potential future regressions, isn't there a way to also assess the expected result of the merges?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I'll add such an assertion for sure, before I mark it as ready for review, no worries.

Just in case you were concerned, we already have a few tests covering merge keys :)

describe('merge keys', () => {

I just didn't cover diagnostics. :P

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nulltoken just in case you were interested, a test case has been added.
Thanks for providing an excellent fixture I could use right away. :)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nulltoken just in case you were interested, a test case has been added.

image

@P0lip P0lip marked this pull request as ready for review September 16, 2019 13:22
@P0lip P0lip self-assigned this Sep 16, 2019
@P0lip P0lip added the bug Something isn't working label Sep 16, 2019
Copy link
Contributor

@marbemac marbemac left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👏 looks good to me!

@P0lip P0lip merged commit f5d83fe into master Sep 17, 2019
@P0lip P0lip deleted the fix/merge-keys branch September 17, 2019 07:50
@stoplight-bot
Copy link
Collaborator

🎉 This PR is included in version 3.1.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

P0lip added a commit that referenced this pull request Sep 18, 2019
…#25)

* fix: do not report duplicate keys errors for keys added by merge keys

* test: extra override scenario
P0lip added a commit that referenced this pull request Sep 18, 2019
* feat(dumping): support lineWidth

* fix: do not report duplicate keys errors for keys added by merge keys (#25)

* fix: do not report duplicate keys errors for keys added by merge keys

* test: extra override scenario

* chore: use @stoplight/yaml-ast-parser
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working released
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Yaml merge keys issue
4 participants