commit | 39188db5885871ea0132a6314eab0c1b5d179a8b | [log] [tgz] |
---|---|---|
author | Peter Weinbergr <pjw@google.com> | Fri Aug 21 08:50:11 2020 -0400 |
committer | Peter Weinberger <pjw@google.com> | Fri Sep 04 18:57:47 2020 +0000 |
tree | aa542649568b830364067b2d97ed92937cd7fa39 | |
parent | 93eecc3576be04bf4c262289a280dfe13690c317 [diff] |
internal/lsp: add support for RelatedInformation in diagnostics The type checker sometimes emits secondary diagnostics. For instance, if a function is defined twice, then when it sees the second definition it emits a diagnostic at the second definition and a secondary diagnostic pointing to the first diagnostic. Presently gopls treats these as two separate diagnostics. The changed code still produces two diagnostics, but now the secondary diagnostic is also converted into a RelatedInformation so the user sees a xpointer to the earlier definition. Updates https://github.com/golang/go/issues/39062. Change-Id: Ic421ec91d2b46c28681ab3ec010d5b02c0442e68 Reviewed-on: https://go-review.googlesource.com/c/tools/+/251617 Run-TryBot: Peter Weinberger <pjw@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Rebecca Stambler <rstambler@golang.org>
This subrepository holds the source for various packages and tools that support the Go programming language.
Some of the tools, godoc
and vet
for example, are included in binary Go distributions.
Others, including the Go guru
and the test coverage tool, can be fetched with go get
.
Packages include a type-checker for Go and an implementation of the Static Single Assignment form (SSA) representation for Go programs.
The easiest way to install is to run go get -u golang.org/x/tools/...
. You can also manually git clone the repository to $GOPATH/src/golang.org/x/tools
.
This repository uses prettier to format JS and CSS files.
The version of prettier
used is 1.18.2.
It is encouraged that all JS and CSS code be run through this before submitting a change. However, it is not a strict requirement enforced by CI.
This repository uses Gerrit for code changes. To learn how to submit changes to this repository, see https://golang.org/doc/contribute.html.
The main issue tracker for the tools repository is located at https://github.com/golang/go/issues. Prefix your issue with “x/tools/(your subdir):” in the subject line, so it is easy to find.