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

x/tools/gopls: make vet analyzers consistent with cmd/vet #42263

Closed
smasher164 opened this issue Oct 28, 2020 · 2 comments
Closed

x/tools/gopls: make vet analyzers consistent with cmd/vet #42263

smasher164 opened this issue Oct 28, 2020 · 2 comments
Labels
FrozenDueToAge gopls Issues related to the Go language server, gopls. NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. Tools This label describes issues relating to any tools in the x/tools repository.
Milestone

Comments

@smasher164
Copy link
Member

What did you do?

I compared the vet analyzers listed in internal/lsp/source/options.go for v0.5.2 with those listed in cmd/vet/main.go for v1.14:

What did you expect to see?

That they were the same.

What did you see instead?

--- gopls.txt
+++ vet.txt
@@ -1,7 +1,6 @@
 asmdecl.Analyzer,
 assign.Analyzer,
 atomic.Analyzer,
-atomicalign.Analyzer,
 bools.Analyzer,
 buildtag.Analyzer,
 cgocall.Analyzer,
@@ -9,12 +8,14 @@ composite.Analyzer,
 copylock.Analyzer,
 errorsas.Analyzer,
 httpresponse.Analyzer,
+ifaceassert.Analyzer,
 loopclosure.Analyzer,
 lostcancel.Analyzer,
 nilfunc.Analyzer,
 printf.Analyzer,
 shift.Analyzer,
 stdmethods.Analyzer,
+stringintconv.Analyzer,
 structtag.Analyzer,
 tests.Analyzer,
 unmarshal.Analyzer,

ifaceassert.Analyzer and stringintconv.Analyzer need to be added, and IIRC atomicalign.Analyzer isn't part of vet.

Build info

golang.org/x/tools/gopls v0.5.2
    golang.org/x/tools/gopls@v0.5.2 h1:lyHTekqy0QhXzz5hDFnfMGHk0Qmuq+LWH5VN/o19YLk=
    github.com/BurntSushi/toml@v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ=
    github.com/google/go-cmp@v0.5.1 h1:JFrFEBb2xKufg6XkJsJr+WbKb4FQlURi5RUcBveYu9k=
    github.com/sergi/go-diff@v1.1.0 h1:we8PVUC3FE2uYfodKH/nBHMSetSfHDR6scGdBi+erh0=
    golang.org/x/mod@v0.3.0 h1:RM4zey1++hCTbCVQfnWeKs9/IEsaBLA8vTkd0WVtmH4=
    golang.org/x/sync@v0.0.0-20200625203802-6e8e738ad208 h1:qwRHBd0NqMbJxfbotnDhm2ByMI1Shq4Y6oRJo21SGJA=
    golang.org/x/tools@v0.0.0-20201028153306-37f0764111ff h1:TU04fJ6/hxmk+6BeFPKM3iuCGqj0ep6ghDdEdhN1cnk=
    golang.org/x/xerrors@v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE=
    honnef.co/go/tools@v0.0.1-2020.1.5 h1:nI5egYTGJakVyOryqLs1cQO5dO0ksin5XXs2pspk75k=
    mvdan.cc/gofumpt@v0.0.0-20200802201014-ab5a8192947d h1:t8TAw9WgTLghti7RYkpPmqk4JtQ3+wcP5GgZqgWeWLQ=
    mvdan.cc/xurls/v2@v2.2.0 h1:NSZPykBXJFCetGZykLAxaL6SIpvbVy/UFEniIfHAa8A=
@smasher164 smasher164 added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Oct 28, 2020
@gopherbot gopherbot added Tools This label describes issues relating to any tools in the x/tools repository. gopls Issues related to the Go language server, gopls. labels Oct 28, 2020
@gopherbot gopherbot added this to the Unreleased milestone Oct 28, 2020
@gopherbot
Copy link

Change https://golang.org/cl/266058 mentions this issue: internal/lsp/source: add missing vet analyzers

@stamblerre
Copy link
Contributor

Thanks for the report! Just sent out a change to fix this.

@stamblerre stamblerre modified the milestones: Unreleased, gopls/v0.5.3 Oct 29, 2020
@golang golang locked and limited conversation to collaborators Oct 29, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge gopls Issues related to the Go language server, gopls. NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. Tools This label describes issues relating to any tools in the x/tools repository.
Projects
None yet
Development

No branches or pull requests

3 participants