mirror of https://github.com/golang/go.git
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> |
||
|---|---|---|
| .. | ||
| hooks | ||
| regtest | ||