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 | ||
| browser | ||
| cache | ||
| cmd | ||
| debug | ||
| diff | ||
| fake | ||
| fuzzy | ||
| helper | ||
| lsprpc | ||
| mod | ||
| protocol | ||
| snippet | ||
| source | ||
| testdata | ||
| tests | ||
| README.md | ||
| call_hierarchy.go | ||
| code_action.go | ||
| code_lens.go | ||
| command.go | ||
| completion.go | ||
| completion_test.go | ||
| debounce.go | ||
| debounce_test.go | ||
| definition.go | ||
| diagnostics.go | ||
| folding_range.go | ||
| format.go | ||
| general.go | ||
| highlight.go | ||
| hover.go | ||
| implementation.go | ||
| link.go | ||
| lsp_test.go | ||
| progress.go | ||
| progress_test.go | ||
| references.go | ||
| rename.go | ||
| reset_golden.sh | ||
| semantic.go | ||
| server.go | ||
| server_gen.go | ||
| signature_help.go | ||
| symbols.go | ||
| text_synchronization.go | ||
| workspace.go | ||
| workspace_symbol.go | ||
README.md
lsp
internal/lsp provides much of the Language Server Protocol (lsp) implementation for gopls.
Documentation for users and contributors can be found in the
gopls/doc directory.