commit | bb69444e3513f1cfc8a08c169bcad48f1d22d728 | [log] [tgz] |
---|---|---|
author | Pontus Leitzler <leitzler@gmail.com> | Sat Jul 31 20:08:00 2021 +0200 |
committer | Rebecca Stambler <rstambler@golang.org> | Mon Aug 02 20:18:28 2021 +0000 |
tree | 721e30ad90639736cc68b84a2d68c014d4877557 | |
parent | f8cfadacc87adf3dd49cc1c165eb4f70931fc6fe [diff] |
internal/lsp: send "extract variable" edits ordered Edits from the code action "extract variable" wasn't ordered. The reason this wasn't picked up by the tests (and in fact, the test failed when edits were in order) is that multiple edits to the same file was sent as multiple "DocumentChanges" with a single edit each. By updating ApplyFix() to consolidate edits to the same file into a single DocumentChange with multiple edits, we avoid the undefined(?) behaviour of how clients should handle multiple DocumentChanges to the same file & version. Fixes golang/go#47486 Change-Id: Ie4a4718ceb40693b84c014f66c8fc0d221843d88 Reviewed-on: https://go-review.googlesource.com/c/tools/+/338869 Trust: Pontus Leitzler <leitzler@gmail.com> Run-TryBot: Pontus Leitzler <leitzler@gmail.com> gopls-CI: kokoro <noreply+kokoro@google.com> TryBot-Result: Go Bot <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.