go/internal/lsp/cmd
Heschi Kreinick 144d5ced6b internal/lsp: run type error analyzers as part of diagnostics
Type error analyzers can be viewed as enhancing type errors, rather
than analyzers in their own right. Create a source.DiagnosePackage
function that combines the list/parse/typecheck diagnostics with type
error analyzers. This allows us to remove some special cases from the
analysis path, and is a first step in removing all the special
handling for analysis quick fixes.

Along the way:
Pass pointers to source.Analyzer after I spent half an hour chasing a
loop capture bug. Spend a further 2-3 hours chasing slowdown in the
command tests as a result.

Move Unnecessary tag generation into diagnostic creation rather than
as a mutating post-processing step that required cloning diagnostics.

Change-Id: Id246667a9dcf484dc79516f92d5524261c435794
Reviewed-on: https://go-review.googlesource.com/c/tools/+/297879
Trust: Heschi Kreinick <heschi@google.com>
Trust: Rebecca Stambler <rstambler@golang.org>
Run-TryBot: Heschi Kreinick <heschi@google.com>
gopls-CI: kokoro <noreply+kokoro@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Rebecca Stambler <rstambler@golang.org>
2021-03-03 21:51:40 +00:00
..
test all: replace all usages of os/exec with golang.org/x/sys/execabs 2021-01-19 22:25:03 +00:00
call_hierarchy.go internal/lsp/cmd: improve help output of gopls subcommands 2021-01-25 18:56:18 +00:00
capabilities_test.go internal/lsp: update to latest version of LSP protocol 2021-02-02 11:32:59 +00:00
check.go internal/lsp/cmd: improve help output of gopls subcommands 2021-01-25 18:56:18 +00:00
cmd.go internal/lsp: run type error analyzers as part of diagnostics 2021-03-03 21:51:40 +00:00
cmd_test.go
definition.go
export_test.go
folding_range.go
format.go
highlight.go internal/lsp/cmd: improve help output of gopls subcommands 2021-01-25 18:56:18 +00:00
implementation.go internal/lsp/cmd: improve help output of gopls subcommands 2021-01-25 18:56:18 +00:00
imports.go
info.go
inspect.go
links.go
prepare_rename.go internal/lsp/cmd: improve help output of gopls subcommands 2021-01-25 18:56:18 +00:00
references.go
rename.go
semantictokens.go internal/lsp: update to latest version of LSP protocol 2021-02-02 11:32:59 +00:00
serve.go
serve_test.go
signature.go internal/lsp/cmd: improve help output of gopls subcommands 2021-01-25 18:56:18 +00:00
suggested_fix.go
symbols.go
workspace.go internal/lsp: switch to the new command API 2021-02-09 22:09:28 +00:00
workspace_symbol.go