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
x/tools/gopls: vet and staticcheck return "same" diagnostic #34494
Comments
Thanks for reporting. I guess the correct solution would be to maintain some set of duplicate checks. Deduping these diagnostics as we see them wouldn't work because they may have differently worded messages, etc. Should we disable vet checks that are provided by staticcheck or vice versa? |
I seem to recall from Slack the other day, @dominikh mentioning that he plans to effectively subsume all vet checks in |
That is indeed the plan, but it is a long-term plan for me. And, of course, vet will continue to gain new checks, too, so I wouldn't simply replace Maintaining a list of duplicate checks sounds like the correct approach. Deciding which implementation of a check to use will be the hard part. Some checks are better in staticcheck, some are better in vet… And the list will need to be kept in sync as either vet or staticcheck gain new checks that overlap. |
Also, this issue extends to golint as well. |
@stamblerre just wondering whether this is small enough to try and fix for v1.0.0? It's a bit of an annoyance to have double entries in the diagnostics. |
Is it just this check that's a duplicate or are there others? I can hardcode something if it's just a few. |
I've only seen this one to date. |
Change https://golang.org/cl/215118 mentions this issue: |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
Running with
staticcheck
turned on.With the following file:
the following "identical" diagnostics are returned:
What did you expect to see?
Just one diagnostic reporting the missing argument.
What did you see instead?
Two, as above.
cc @stamblerre @ianthehat
The text was updated successfully, but these errors were encountered: