mirror of https://github.com/golang/go.git
Collapse Diagnostic.Kind, Source, and Category into just Source. Remove code that converted from Diagnostic to Diagnostic. Notes on the changes I had to make along the way: - We used to use Kind to determine Severity. Set Severity when the Diagnostic is created instead. - Use constants for Source as much as possible -- we still need to use Analyzer.Name for analysis diagnostics. It would be nice to break that dependency so that Source was totally opaque, but that's a separate issue. - Introduce a new Source for gc_details, "optimizer details". It was "go compiler" previously. - Some of the assignments are a little arbitrary. Is inconsistent vendoring really a "go list" error? - GetTypeCheckDiagnostics had code to cope with diagnostics that had no URI associated with them. We now spread such diagnostics to all files when they are generated. - Analyze modifies Diagnostics by adding a Tag to them. That means it has to own them, so I had it clone them. I would like to push that logic down to the diagnostics, per the TODO, but that's another CL. And some observations: - It's obviously tempting to combine DiagnosticSource and diagnosticSource, but they mean very different things. I'm open to a better name for one or the other. Change-Id: If2e861d6fe16bfd2e5ba216cf7e29cf338d0fd25 Reviewed-on: https://go-review.googlesource.com/c/tools/+/288215 Trust: Heschi Kreinick <heschi@google.com> 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> |
||
|---|---|---|
| .. | ||
| analysis.go | ||
| cache.go | ||
| check.go | ||
| error_test.go | ||
| errors.go | ||
| imports.go | ||
| keys.go | ||
| load.go | ||
| mod.go | ||
| mod_tidy.go | ||
| os_darwin.go | ||
| os_windows.go | ||
| parse.go | ||
| parse_test.go | ||
| pkg.go | ||
| session.go | ||
| snapshot.go | ||
| view.go | ||
| view_test.go | ||
| workspace.go | ||
| workspace_test.go | ||