-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
add staticcheck as a presubmit check #10779
Comments
@julieqiu We do actually run staticcheck, but we ignore some warnings from it today. See: google-cloud-go/.github/workflows/vet.sh Lines 82 to 90 in 1e21bcf
|
@codyoss Do you think any of the current ignores could be addressed and removed at this time? |
I honestly don't know without looking. Some things could likely be cleaned up but I think some of these that we skip would take a breaking change to actually fix the issue -- at least I vaguely recall this being the case from a couple of years back when I had looked at this. |
There's an existing related issue #9784 Most linting tooling works in a module boundary. So if you run Or in other words neither I created a proof of concept script in https://github.com/egonelbre/google-cloud-go/pull/1/files#diff-25b8fc8d894e1d2f71768a6e38f68cecaad5d7d861ba6b16f1ad40f9f94516fb -- but it probably would need to be adjusted to fit Google's needs better. More of a starting point. And I've been fixing linting issues for spanner https://github.com/googleapis/google-cloud-go/pulls/egonelbre |
@egonelbre Thank you (again!) for your help with these issues. Appreciate your comments and POC! |
staticcheck is a common linter for Go projects. We should consider adding it as a presubmit check for PRs. See googleapis/gapic-generator-go#1404 and googleapis/gapic-showcase#1529 for related issues.
This first requires fixing these issues in this repository:
The text was updated successfully, but these errors were encountered: