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 buf lint not catching non repeated rules defined on repeated fields of matching type #2647

Conversation

oliversun9
Copy link
Contributor

This PR fixes the bug where buf lint (PROTOVALIDATE) does not catch a non repeated rule incorrectly defined on a repeated field of matching type. For example,

repeated string foo = 1 [(buf.validate.field).string.min_len = 10];

wasn't caught.

Also updates bufanalysistesting.AssertFileAnnotationsEqual for more descriptive error messages.

@oliversun9 oliversun9 merged commit 44af737 into main Dec 5, 2023
8 checks passed
@oliversun9 oliversun9 deleted the osun/lint-protovalidate-non-repeated-rules-for-repeated-field branch December 5, 2023 01:20
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