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

Support staticcheck lint:ignore and lint:file-ignore directives #33

Merged
merged 7 commits into from
Oct 11, 2023

Conversation

jeremyeim
Copy link
Contributor

@jeremyeim jeremyeim marked this pull request as ready for review October 9, 2023 23:09
Copy link
Owner

@sluongng sluongng left a comment

Choose a reason for hiding this comment

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

This is a great PR. I only have some nits before this can be merged, no functional concerns.

Worth noting to future readers that bazel-contrib/rules_go#3562 also exists in rules_go as a way to ignore lint check. However, this PR implements staticcheck specific ignore directive which is a bit nicer.

staticcheck/util/util.go Outdated Show resolved Hide resolved
staticcheck/util/util.go Outdated Show resolved Hide resolved
staticcheck/util/directive.go Outdated Show resolved Hide resolved
@jeremyeim jeremyeim requested a review from sluongng October 10, 2023 15:07
@jeremyeim
Copy link
Contributor Author

This is a great PR. I only have some nits before this can be merged, no functional concerns.

Worth noting to future readers that bazelbuild/rules_go#3562 also exists in rules_go as a way to ignore lint check. However, this PR implements staticcheck specific ignore directive which is a bit nicer.

I had been looking for ways to ignore lint checks, and didn't know about that PR. I'll probably open a PR against rules_go to update https://github.com/bazelbuild/rules_go/blob/master/go/nogo.rst, as it's not present there.

@jeremyeim jeremyeim requested a review from sluongng October 10, 2023 16:11
Copy link
Owner

@sluongng sluongng left a comment

Choose a reason for hiding this comment

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

LGTM

@sluongng sluongng merged commit 4d430b5 into sluongng:master Oct 11, 2023
@jeremyeim jeremyeim deleted the nolint_directives branch October 11, 2023 14:32
@dimo414
Copy link

dimo414 commented May 30, 2024

@sluongng would it be possible to cut a new release including this PR?

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.

3 participants