1
0
mirror of https://github.com/golang/go synced 2024-11-18 16:54:43 -07:00

internal/lsp/source: add more go/analysis/passes analyzers to LSP's suite

The LSP already supports a bunch of analyses we have less confidence in
than the vet suite so we should add these too.

Updates golang/go#36639

Change-Id: Ifc37d09e3acd73de021be7b45b3d80fe8c00e0d7
Reviewed-on: https://go-review.googlesource.com/c/tools/+/215677
Run-TryBot: Michael Matloob <matloob@golang.org>
Reviewed-by: Rebecca Stambler <rstambler@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
This commit is contained in:
Michael Matloob 2020-01-21 13:27:46 -05:00
parent 4320446551
commit f3a16861ae

View File

@ -20,15 +20,20 @@ import (
"golang.org/x/tools/go/analysis/passes/cgocall"
"golang.org/x/tools/go/analysis/passes/composite"
"golang.org/x/tools/go/analysis/passes/copylock"
"golang.org/x/tools/go/analysis/passes/deepequalerrors"
"golang.org/x/tools/go/analysis/passes/errorsas"
"golang.org/x/tools/go/analysis/passes/httpresponse"
"golang.org/x/tools/go/analysis/passes/loopclosure"
"golang.org/x/tools/go/analysis/passes/lostcancel"
"golang.org/x/tools/go/analysis/passes/nilfunc"
"golang.org/x/tools/go/analysis/passes/nilness"
"golang.org/x/tools/go/analysis/passes/printf"
"golang.org/x/tools/go/analysis/passes/shadow"
"golang.org/x/tools/go/analysis/passes/shift"
"golang.org/x/tools/go/analysis/passes/sortslice"
"golang.org/x/tools/go/analysis/passes/stdmethods"
"golang.org/x/tools/go/analysis/passes/structtag"
"golang.org/x/tools/go/analysis/passes/testinggoroutine"
"golang.org/x/tools/go/analysis/passes/tests"
"golang.org/x/tools/go/analysis/passes/unmarshal"
"golang.org/x/tools/go/analysis/passes/unreachable"
@ -472,6 +477,7 @@ var defaultAnalyzers = map[string]*analysis.Analyzer{
cgocall.Analyzer.Name: cgocall.Analyzer,
composite.Analyzer.Name: composite.Analyzer,
copylock.Analyzer.Name: copylock.Analyzer,
errorsas.Analyzer.Name: errorsas.Analyzer,
httpresponse.Analyzer.Name: httpresponse.Analyzer,
loopclosure.Analyzer.Name: loopclosure.Analyzer,
lostcancel.Analyzer.Name: lostcancel.Analyzer,
@ -487,5 +493,9 @@ var defaultAnalyzers = map[string]*analysis.Analyzer{
unusedresult.Analyzer.Name: unusedresult.Analyzer,
// Non-vet analyzers
sortslice.Analyzer.Name: sortslice.Analyzer,
deepequalerrors.Analyzer.Name: deepequalerrors.Analyzer,
nilness.Analyzer.Name: nilness.Analyzer,
shadow.Analyzer.Name: shadow.Analyzer,
sortslice.Analyzer.Name: sortslice.Analyzer,
testinggoroutine.Analyzer.Name: testinggoroutine.Analyzer,
}