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 comment ignore with trailing comment not recognized #3295

Merged
merged 6 commits into from
Sep 6, 2024

Conversation

oliversun9
Copy link
Contributor

This fixes the problem where comment ignores with a trailing comment is not recognized as a comment ignore:

// buf:lint:ignore PACKAGE_DIRECTORY_MATCH some comment ...

Copy link
Contributor

github-actions bot commented Sep 6, 2024

The latest Buf updates on your PR. Results from workflow Buf CI / buf (pull_request).

BuildFormatLintBreakingUpdated (UTC)
✅ passed✅ passed✅ passed✅ passedSep 6, 2024, 9:17 PM

//
// Invalid:
// // buf:lint:ignore SERVICE_SUFFIX, SERVICE_PASCAL_CASE
// // buf:lint:ignore SERVICE_PASCAL_CASE, SERVICE_SUFFIX
Copy link
Member

Choose a reason for hiding this comment

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

Is this saying that you can do comma-separated ignores? I don't think that's in scope

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated comment in f516a9c (it also said ignoring SERVICE_PASCAL_CASE and this rule only on top)

CHANGELOG.md Outdated
@@ -2,7 +2,8 @@

## [Unreleased]

- No changes yet.
- Fix issue with `buf lint` where comment ignores in the shape of `// buf:lint:ignore <RULE_ID> <extra comment>`
are not recognized due to the extra comment.
Copy link
Member

Choose a reason for hiding this comment

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

were not recognized not are not recognized

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed in 78c78e6

@oliversun9 oliversun9 merged commit ce4082e into main Sep 6, 2024
11 checks passed
@oliversun9 oliversun9 deleted the osun/allow-comment-ignore-with-trailing-comment branch September 6, 2024 21:45
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