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

UnrecognizedArgument error should mention first invalid argument, not the last one #2029

Merged
merged 3 commits into from
Jan 20, 2023

Conversation

adamsitnik
Copy link
Member

In #1959 I've introduce a bug that SDK has hit in dotnet/sdk#29131

Previously, the method was returning error for the first mismatch:

return new ParseError(
Resources
.UnrecognizedArgument(token.Value, argument.AllowedValues),
this);

After my changes it was the last one. This fix just helps me to unblock the SDK update, it does not solve the problem of producing multiple errors by a single validator.

Co-authored-by: Jon Sequeira <jonsequeira@gmail.com>
@adamsitnik adamsitnik merged commit 92bd70e into dotnet:main Jan 20, 2023
@adamsitnik adamsitnik deleted the UnrecognizedArgumentErrorFix branch January 20, 2023 17:13
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.

2 participants