go/internal/lsp/source
Heschi Kreinick e7dfe0279f internal/lsp: remove redundant fields/code after source.Error deletion
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>
2021-02-02 23:37:55 +00:00
..
completion internal/lsp: fix autocomplete appends on imports 2020-12-29 22:18:35 +00:00
api_json.go internal/lsp: re-enable upgrades for individual dependencies 2021-02-01 17:10:16 +00:00
call_hierarchy.go internal/lsp/source: return all field funcs from outgoing callhierarchy 2021-01-05 17:25:16 +00:00
code_lens.go internal/lsp/source: only show "run file benchmarks" if available 2020-12-17 23:51:54 +00:00
command.go internal/lsp: update to latest version of LSP protocol 2021-02-02 11:32:59 +00:00
comment.go all: add copyright notices to files that are missing them 2021-01-06 17:23:47 +00:00
comment_test.go all: add copyright notices to files that are missing them 2021-01-06 17:23:47 +00:00
diagnostics.go internal/lsp: remove redundant fields/code after source.Error deletion 2021-02-02 23:37:55 +00:00
extract.go internal/lsp: fix some incorrect spelling 2020-11-24 11:59:21 +00:00
folding_range.go all: add copyright notices to files that are missing them 2021-01-06 17:23:47 +00:00
format.go internal/lsp, gopls: recover from go-diff panics 2020-12-17 16:56:54 +00:00
format_test.go all: add copyright notices to files that are missing them 2021-01-06 17:23:47 +00:00
gc_annotations.go internal/lsp: remove redundant fields/code after source.Error deletion 2021-02-02 23:37:55 +00:00
highlight.go internal/lsp: fix some incorrect spelling 2020-11-24 11:59:21 +00:00
hover.go internal/lsp: add ?utm_source=gopls to links to pkg.go.dev 2020-11-16 00:15:58 +00:00
identifier.go internal/lsp: fix godef for embedded type aliases 2020-11-23 15:59:28 +00:00
identifier_test.go internal/lsp: fix some incorrect spelling 2020-11-24 11:59:21 +00:00
implementation.go internal/lsp/source: move completion to its own package 2020-09-08 19:19:08 +00:00
options.go internal/lsp: enable semantic tokens as part of all experiments 2021-02-02 16:03:30 +00:00
options_test.go internal/lsp: restructure user options (CL 278433 continued) 2020-12-30 21:54:22 +00:00
references.go internal/lsp/source: rename uses of embedded fields 2021-01-12 21:27:35 +00:00
rename.go internal/lsp/source: make it an error to rename embedded fields 2021-01-26 13:52:46 +00:00
rename_check.go internal/lsp: remove the source.Error type 2021-02-02 20:40:51 +00:00
signature_help.go internal/lsp/source: respect user's hover kind in signature help 2020-10-29 22:52:41 +00:00
source_test.go internal/lsp: update to latest version of LSP protocol 2021-02-02 11:32:59 +00:00
symbols.go internal/lsp: don't show blank identifiers in outline 2020-10-09 01:09:51 +00:00
types_format.go internal/lsp/source: fix default param name generation 2020-12-07 19:19:02 +00:00
util.go internal/lsp: disable support for symlinks pending decision 2020-12-01 05:30:39 +00:00
view.go internal/lsp: remove redundant fields/code after source.Error deletion 2021-02-02 23:37:55 +00:00
workspace_symbol.go internal/lsp/source: simplify workspace symbol package collection 2020-12-07 18:57:54 +00:00
workspace_symbol_test.go internal/lsp/source: support some fzf-like tokens in symbol matching 2020-09-08 16:35:05 +00:00