go/internal/lsp/mod
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
..
testdata/unchanged internal/lsp/tests: fix reset of golden files 2020-02-19 14:42:13 +00:00
code_lens.go internal/lsp: apply go.sum fixes to all modules in multi-module module 2021-02-10 01:33:22 +00:00
diagnostics.go internal/lsp: run type error analyzers as part of diagnostics 2021-03-03 21:51:40 +00:00
format.go all: add copyright notices to files that are missing them 2021-01-06 17:23:47 +00:00
hover.go all: add copyright notices to files that are missing them 2021-01-06 17:23:47 +00:00
mod_test.go internal/lsp/cache: assign a static temp workspace dir to the first view 2020-11-04 18:18:50 +00:00