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

Return all errors from Map KeysAre validators #74

Merged
merged 2 commits into from
Nov 16, 2022

Conversation

mgood
Copy link
Contributor

@mgood mgood commented Nov 7, 2022

Fixes #73

Removes the resp.Diagnostics.HasError() check exiting the loop early so that
all validators are checked instead of returning after the first error.

Updates the test to check the number of errors instead. To avoid redundancy with
the expectError bool, this changes all test cases to just check for the
specific number of errors.

@mgood mgood requested a review from a team as a code owner November 7, 2022 21:50
@hashicorp-cla
Copy link

hashicorp-cla commented Nov 7, 2022

CLA assistant check
All committers have signed the CLA.

Copy link
Contributor

@bendbennett bendbennett left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@bendbennett bendbennett merged commit b6de2e8 into hashicorp:main Nov 16, 2022
@mgood mgood deleted the map-keysare-all-errors branch November 19, 2022 18:58
@github-actions
Copy link

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active contributions.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 20, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

mapvalidator: KeysAre Returns on First Error
3 participants