internal/lsp/hooks: enable staticcheck hooks

Forgot to enable the staticcheck hooks when I created a struct for analyzers inside of the lsp (https://go-review.googlesource.com/c/tools/+/223662).

Change-Id: Ice7798089100107113741caed3ddc41d172830b4
Reviewed-on: https://go-review.googlesource.com/c/tools/+/225837
Run-TryBot: Rohan Challa <rohan@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Paul Jolly <paul@myitcv.org.uk>
Reviewed-by: Rebecca Stambler <rstambler@golang.org>
This commit is contained in:
Rohan Challa 2020-03-27 08:20:41 -04:00
Родитель 5d86d385bf
Коммит 8db92c5f61
1 изменённых файлов: 3 добавлений и 3 удалений

Просмотреть файл

@ -14,17 +14,17 @@ import (
func updateAnalyzers(options *source.Options) {
if options.StaticCheck {
for _, a := range simple.Analyzers {
options.Analyzers[a.Name] = source.Analyzer{Analyzer: a}
options.Analyzers[a.Name] = source.Analyzer{Analyzer: a, Enabled: true}
}
for _, a := range staticcheck.Analyzers {
// This check conflicts with the vet printf check (golang/go#34494).
if a.Name == "SA5009" {
continue
}
options.Analyzers[a.Name] = source.Analyzer{Analyzer: a}
options.Analyzers[a.Name] = source.Analyzer{Analyzer: a, Enabled: true}
}
for _, a := range stylecheck.Analyzers {
options.Analyzers[a.Name] = source.Analyzer{Analyzer: a}
options.Analyzers[a.Name] = source.Analyzer{Analyzer: a, Enabled: true}
}
}
}