You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The blank identifier is the standard way of indicating that a value is not to be used. It seems counter productive to make vet warn on it.
1 is intentional, 2 does not seem to a frequent issue, nor does it affect correctness. 3 will cause serious churn for projects that use things like https://github.com/kisielk/errcheck
Given the current state of the ecosystem, I don't think this meets the bar for frequency or precision for cmd/vet.
It may make sense as an external linter.
The fact that Go compiler treats unused variables as error is cool, but it's annoying, so many developers uses code like this:
If it's a temporary solution it is OK, but if variable really not used anywhere, it can lead to unnecessary resource or time consumption. For example:
Therefore, i propose some changes to go vet:
It will help remove really unused variables and unnecessary void register assigns
The text was updated successfully, but these errors were encountered: