Change-Id: I5d5f6cc4a6984b8577e8178082bc60dfe08107b6
GitHub-Last-Rev: 16ede6bf75
GitHub-Pull-Request: golang/tools#490
Reviewed-on: https://go-review.googlesource.com/c/tools/+/580156
Reviewed-by: Ian Lance Taylor <iant@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Jonathan Amsterdam <jba@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
(The previous CL 559935 was insufficient.)
Also, improve test output.
Updates golang/go#65294
Change-Id: I05cafadce0dd6f18ff66d2ca462a3eb546c4ca81
Reviewed-on: https://go-review.googlesource.com/c/tools/+/577576
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Robert Findley <rfindley@google.com>
...and factor numerous places to use it.
(This pattern kept recurring during my types.Alias audit,
golang/go#65294.)
Change-Id: I93228b735f7a8ff70df5c998017437d43742d9f3
Reviewed-on: https://go-review.googlesource.com/c/tools/+/565075
Auto-Submit: Alan Donovan <adonovan@google.com>
Reviewed-by: Jonathan Amsterdam <jba@google.com>
Reviewed-by: Tim King <taking@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Robert Findley <rfindley@google.com>
ioutil defines 7 functions. 6 of these are replaced by
functions in io or os with the same signature.
ReadDir is deprecated, but the suggested replacement has a different
signature.
These changes were generated by a program, with some manual adjutments.
The program replaces ReadDir with a call to a function named ioutilReadDir
that has the same signature. The code for this function
is added to files if necessary. The program replaces all the others
with their new versions. The program removes the 'io/ioutil' import
and adds, as necessary, 'os', 'io', and 'io/fs', the latter being
needed for the signature of ioutilReadDir.
The automatic process fails in a few ways:
1. ReadFile occurs only in a comment but the program adds an unneeded import.
2. ioutilReadDir is added to more than one file in the same package
Both of these could be viewed as bugs and fixed by looking harder.
After manual adjustment, two tests failed:
1. gopls/internal/lsp/regtesg/mis:TestGenerateProgress. The reason
was a use of ioutil in a txtar constant. The calls were changed,
but the code is not smart enough to change the import inside the
string constant. (Or it's not smart enough not to change the
contents of a string.)
2. gopls/internal/lsp/analysis/deprecated, which wants to see a use
of ioutil
These tests were adjused by hand, and all tests (-short) pass.
Change-Id: If9efe40bbb0edda36173d9a88afaf71245db8e79
Reviewed-on: https://go-review.googlesource.com/c/tools/+/527675
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Peter Weinberger <pjw@google.com>
Reviewed-by: Heschi Kreinick <heschi@google.com>
Gofmt to update doc comments to the new formatting.
(There are so many files in x/tools I am breaking up the
gofmt'ing into multiple CLs. This is the leftovers.)
For golang/go#51082.
Change-Id: Id9d440cde9de7093d2ffe06cbaa7098993823d6b
Reviewed-on: https://go-review.googlesource.com/c/tools/+/399363
Run-TryBot: Russ Cox <rsc@golang.org>
Auto-Submit: Russ Cox <rsc@golang.org>
gopls-CI: kokoro <noreply+kokoro@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Modify the Report representation to be a list of Change values,
instead of two string slices.
This will enable adding more information to each change, like source
location.
Change-Id: Ia7389d7bc552479ea5e06efd7fdefe004058e66f
Reviewed-on: https://go-review.googlesource.com/c/tools/+/172777
Run-TryBot: Jay Conrod <jayconrod@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Jay Conrod <jayconrod@google.com>