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 anchor diagnostics #846

Merged

Conversation

kraftwerk28
Copy link
Contributor

What does this PR do?

Fixes broken warnings on unused anchors inside an array:
image

What issues does this PR fix or reference?

Is it tested? How?

Test case included in PR.

@coveralls
Copy link

coveralls commented Feb 22, 2023

Coverage Status

Coverage: 83.225% (-0.02%) from 83.248% when pulling e20f9a1 on kraftwerk28:fix/array-unused-anchor into 42b7a8e on redhat-developer:main.

Copy link
Collaborator

@gorkem gorkem left a comment

Choose a reason for hiding this comment

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

Thank you for the contribution. If you can move the test to the correct place, it is good to go for me.

@@ -1966,5 +1966,17 @@ obj:
expect(result[0].message).to.eq('Matches multiple schemas when only one must validate.');
expect(telemetry.messages).to.be.empty;
});

it('Unused anchors in an array', async () => {
Copy link
Collaborator

Choose a reason for hiding this comment

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

This test should be in

describe('Unused anchors diagnostics', () => {

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure, I've updated an existing test case to have multiple [un]used anchors handling in an array.

Copy link
Collaborator

@gorkem gorkem left a comment

Choose a reason for hiding this comment

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

LGTM

@gorkem
Copy link
Collaborator

gorkem commented Feb 28, 2023

@msivasubramaniaan Can you review and merge this one if it is all right?

Copy link
Contributor

@msivasubramaniaan msivasubramaniaan left a comment

Choose a reason for hiding this comment

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

LGTM

@msivasubramaniaan msivasubramaniaan merged commit a8c9883 into redhat-developer:main Feb 28, 2023
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.

None yet

4 participants