Skip to content

Commit ea50a3c

Browse files
committed
internal/lsp: handle staticcheck in code actions
Missed this in CL 254038. Change-Id: I485f6e9112628dc4ff83e7ea47b59b340742711f Reviewed-on: https://go-review.googlesource.com/c/tools/+/254597 Run-TryBot: Rebecca Stambler <[email protected]> gopls-CI: kokoro <[email protected]> TryBot-Result: Go Bot <[email protected]> Reviewed-by: Robert Findley <[email protected]> (cherry picked from commit 17fc728) Reviewed-on: https://go-review.googlesource.com/c/tools/+/254795
1 parent 81fce1a commit ea50a3c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

internal/lsp/code_action.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -323,6 +323,9 @@ func diagnosticToAnalyzer(snapshot source.Snapshot, src, msg string) (analyzer *
323323
if a, ok := snapshot.View().Options().DefaultAnalyzers[src]; ok {
324324
return &a
325325
}
326+
if a, ok := snapshot.View().Options().StaticcheckAnalyzers[src]; ok {
327+
return &a
328+
}
326329
if a, ok := snapshot.View().Options().ConvenienceAnalyzers[src]; ok {
327330
return &a
328331
}

0 commit comments

Comments
 (0)