commit | 74cea6e8cb44c43ddbe51cfecb652101566f2b2b | [log] [tgz] |
---|---|---|
author | Peter Weinberger <pjw@google.com> | Tue Apr 05 10:31:08 2022 -0400 |
committer | Peter Weinberger <pjw@google.com> | Wed Apr 06 14:24:15 2022 +0000 |
tree | 5115cf5e63f9c968ccbfbc52ad35abe5bc3412e4 | |
parent | 37acb39970680a1f927ebf8326384f00e3171480 [diff] |
internal/imports: ignore some line directives This is a minimal fix for the reported panic. The existing code used FileSet.Position() where it should have used FileSet.PositionFor(, false). gopls does this in lots of places; each use of Position() needs to be thought about. x/tools/go/ast/astutil/import.go:273,274 is another example. Fixes: golang/go#51916 Change-Id: I42de6affca2c97c09efb7974a9e44322556b3ffd Reviewed-on: https://go-review.googlesource.com/c/tools/+/398395 Run-TryBot: Peter Weinberger <pjw@google.com> Reviewed-by: Robert Griesemer <gri@golang.org> Reviewed-by: Robert Findley <rfindley@google.com> gopls-CI: kokoro <noreply+kokoro@google.com> Trust: Peter Weinberger <pjw@google.com>
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 install
.
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 install golang.org/x/tools/...@latest
.
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.