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

Revert to prev staticcheck pkg pattern #19

Closed
wants to merge 1 commit into from

Conversation

sanjit-bhat
Copy link
Contributor

According to the staticcheck cli docs, the pkg pattern is parsed just like in normal Go commands. So ./... is the right way to test all pkgs recursively, including test files.

As to why this wasn't catching the ioutil deprecation warning (see previous discussion), I figured it out! ioutil was only deprecated in Go 1.19. Since your go.mod version is 1.16, staticcheck doesn't flag it. When you switched to *.go, it treated each Go file independently, which uses the system (not go.mod) Go version but also 1) might trigger false positives that lack pkg context to resolve and 2) doesn't recursively check things.

I think it's better to switch back to ./..., and if you want to catch those deprecation issues, bump the go version, at the risk of making problems for upstream deps.

@anishathalye
Copy link
Owner

Good catch, thanks for the PR! Added the above info to the commit message in 036c299 and merged in d372c58.

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