Repository navigation
|
Hi, I recently learned that the variable shadowing linting does not exist (anymore) in go vet. Since I only recently started to not use Jetbrains Goland, which does have a visual warning about shadowed warnings, I now learned about the need to lint for this explicitly. I found some issues which are talking about shadowing but did not find an explicit rule in the documentation: https://staticcheck.dev/docs/checks/ So simply put, does staticcheck find shadowed variables? |
Answered by
dominikh
Nov 13, 2025
Replies: 1 comment 2 replies
|
It does not. And generally speaking, if a check would be too noisy for |
2 replies
8000
Answer selected by
fabiante
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It does not. And generally speaking, if a check would be too noisy for
go vet, it wouldn't be a good fit for Staticcheck, either.