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> |
||
|---|---|---|
| .. | ||
| completion | ||
| api_json.go | ||
| call_hierarchy.go | ||
| code_lens.go | ||
| command.go | ||
| comment.go | ||
| comment_test.go | ||
| diagnostics.go | ||
| extract.go | ||
| folding_range.go | ||
| format.go | ||
| format_test.go | ||
| gc_annotations.go | ||
| highlight.go | ||
| hover.go | ||
| identifier.go | ||
| identifier_test.go | ||
| implementation.go | ||
| options.go | ||
| options_test.go | ||
| references.go | ||
| rename.go | ||
| rename_check.go | ||
| signature_help.go | ||
| source_test.go | ||
| symbols.go | ||
| types_format.go | ||
| util.go | ||
| view.go | ||
| workspace_symbol.go | ||
| workspace_symbol_test.go | ||