From 8db92c5f610283fd725cfdfa03001a4f93265ed1 Mon Sep 17 00:00:00 2001 From: Rohan Challa Date: Fri, 27 Mar 2020 08:20:41 -0400 Subject: [PATCH] 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 TryBot-Result: Gobot Gobot Reviewed-by: Paul Jolly Reviewed-by: Rebecca Stambler --- gopls/internal/hooks/analysis.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gopls/internal/hooks/analysis.go b/gopls/internal/hooks/analysis.go index f3388b4c5a..be304d9fa1 100644 --- a/gopls/internal/hooks/analysis.go +++ b/gopls/internal/hooks/analysis.go @@ -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} } } }