1
0
mirror of https://github.com/golang/go synced 2024-09-30 16:08:36 -06:00
Commit Graph

23 Commits

Author SHA1 Message Date
Rebecca Stambler
207d3de1fa all: fix some staticcheck errors
Updates golang/go#35718

Change-Id: I10bfd5421cd44bb58b8bcaa6e9205040c25f51be
Reviewed-on: https://go-review.googlesource.com/c/tools/+/208257
Run-TryBot: Rebecca Stambler <rstambler@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Heschi Kreinick <heschi@google.com>
2020-01-29 04:53:41 +00:00
Alan Donovan
e96c4e2476 x/tools: remove old renaming imports of go/constant as exact
Fixes golang/go#26522

Change-Id: Ie8184a358f11bc7ad855e0eeb964c29848d2263e
Reviewed-on: https://go-review.googlesource.com/128998
Run-TryBot: Alan Donovan <adonovan@google.com>
Reviewed-by: Daniel Martí <mvdan@mvdan.cc>
Reviewed-by: Michael Matloob <matloob@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2018-08-10 17:04:37 +00:00
Robert Griesemer
0d047c8d5a cmd/godex: handle printing of type aliases
Also: remove go1.5 build tags (x/tools requires Go 1.6 or higher).

For golang/go#18130.

Change-Id: I3d9deee9e87d8794b2884281c0bb53caa5ed6221
Reviewed-on: https://go-review.googlesource.com/35106
Reviewed-by: Alan Donovan <adonovan@google.com>
2017-01-11 21:17:45 +00:00
Robert Griesemer
adaaa07486 x/tools: delete x/tools/go/types and dependent packages/client files
Per https://groups.google.com/forum/#!topic/golang-announce/qu_rAphYdxY
this change deletes the packages

  go/exact
  go/gccgoimporter
  go/gcimporter
  go/importer
  go/types
  cmd/vet

from the x/tools repo and any files depending on those packages
building against Go 1.4.

x/tools packages depending on any of these libraries must use the
respective versions from the std lib or use vendored versions if
building against 1.4.

Remaining packages may or may not build against Go 1.4 anymore
and will not be supported against 1.4.

Change-Id: I1c655fc30aee49b6c7326ebd4eb1bb0836ac97e0
Reviewed-on: https://go-review.googlesource.com/20810
Reviewed-by: Alan Donovan <adonovan@google.com>
2016-04-06 21:52:49 +00:00
Robert Griesemer
fe3445e822 x/tools/cmd/godex: prepare sources for switch to 1.5 go/types
- copied all affected xxx.go files to a respective xxx14.go file
- added build tags
- no other source changes

Change-Id: Ic150a097e537ee29a0e0616ab8e1e74b21e3066d
Reviewed-on: https://go-review.googlesource.com/15702
Reviewed-by: Alan Donovan <adonovan@google.com>
2015-10-09 20:47:08 +00:00
David Symonds
24257c8cd2 tools: add import comments.
Change-Id: Idda6e64580432cb9a731e4ebf4005ee4ceb4202d
Reviewed-on: https://go-review.googlesource.com/1244
Reviewed-by: Andrew Gerrand <adg@golang.org>
2014-12-09 22:42:16 +00:00
Andrew Gerrand
5ebbcd132f go.tools: use golang.org/x/... import paths
Rewrite performed with this command:
  sed -i '' 's_code.google.com/p/go\._golang.org/x/_g' \
    $(grep -lr 'code.google.com/p/go.' *)

LGTM=rsc
R=rsc
CC=golang-codereviews
https://golang.org/cl/170920043
2014-11-10 08:50:40 +11:00
Peter Collingbourne
02990bd494 go.tools/go/gccgoimporter: keep track of package and import priority
Clients such as compilers need this information in order
to correctly link against imported packages.

This also adds support for the condensed import data format
where the priority information is stored as a suffix of the
condensed import data, as well as support for archive files.

LGTM=gri
R=gri
CC=golang-codereviews, iant
https://golang.org/cl/78740043
2014-06-17 10:56:47 -07:00
Robert Griesemer
f84e8b3f03 go.tools/cmd/godex: print correct type for const/var decls
The old code printed the underlying type; e.g., the type
of time.Millisecond was reported to be int64 rather than
time.Duration.

Testsuite (and corresponding tests) in progress (another CL).

LGTM=adonovan
R=adonovan, dsymonds
CC=golang-codereviews
https://golang.org/cl/94770045
2014-04-29 19:58:47 -07:00
Robert Griesemer
de6fbfe0ea go.tools/cmd/godex: make relative package paths work
LGTM=adonovan
R=adonovan
CC=golang-codereviews
https://golang.org/cl/89160044
2014-04-18 12:44:23 -04:00
Robert Griesemer
a7ddb1e509 godex: improved printing of numeric constants
TODO: Add testing code (another CL).

LGTM=adonovan
R=golang-codereviews, adonovan
CC=golang-codereviews
https://golang.org/cl/88090044
2014-04-17 11:28:24 -07:00
Robert Griesemer
fa0f6bd591 go.tools/cmd/godex: update documentation
LGTM=adonovan
R=adonovan
CC=golang-codereviews
https://golang.org/cl/83580046
2014-04-07 13:49:05 -07:00
Robert Griesemer
fb8f3e8fbf go/tools/cmd/godex: print combined method sets
LGTM=adonovan
R=adonovan
CC=golang-codereviews
https://golang.org/cl/82890044
2014-04-02 08:49:21 -07:00
Robert Griesemer
4775a5ed46 go.tools/cmd/godex: remove spurious println
TBR=adonovan

TBR=adonovan
R=adonovan
CC=golang-codereviews
https://golang.org/cl/82040043
2014-03-28 15:26:40 -07:00
Robert Griesemer
723686bb4b go.tools/cmd/godex: permit absolute paths for gccgo-generated package (export) files
TBR=adonovan

TBR=adonovan
R=adonovan
CC=golang-codereviews
https://golang.org/cl/82030043
2014-03-28 15:17:20 -07:00
Robert Griesemer
7e60d06cfc go.tools/cmd/godex: don't generate prefixes for local and absolute path arguments
LGTM=adonovan
R=adonovan
CC=golang-codereviews
https://golang.org/cl/81340047
2014-03-28 14:59:25 -07:00
Robert Griesemer
1faba6e3b8 go.tools/cmd/godex: replicate path logic for gccgo-new importer
LGTM=adonovan
R=adonovan
CC=golang-codereviews
https://golang.org/cl/81990043
2014-03-28 14:50:14 -07:00
Robert Griesemer
700390eaed go.tools/cmd/godex: fix prefix generation, filtering, formatting
Details:
- auto-generate prefixes for std lib (e.g., "godex big" works now)
- apply filtering to package-level objects only
- nicer formatting of single-entry const, var, or type declaration

TBR=adonovan
R=adonovan
CC=golang-codereviews
https://golang.org/cl/81360046
2014-03-28 12:21:51 -07:00
Robert Griesemer
f293460f67 go/tools/cmd/godex: don't print unexported methods
and print exported methods of unexported types

LGTM=adonovan
R=adonovan
CC=golang-codereviews
https://golang.org/cl/80920046
2014-03-27 10:49:59 -07:00
Robert Griesemer
8b161c33a9 go.tools/cmd/godex: support for common path prefixes
All of these work now as expected:

        godex code.google.com/p/go.tools/go/types
        godex go.tools/go/types
        godex go/types
        godex types

Also improved logging/verbose mode.

LGTM=adonovan
R=adonovan
CC=golang-codereviews
https://golang.org/cl/80930043
2014-03-26 14:47:52 -07:00
Robert Griesemer
03478d3d3e go.tools/cmd/godex: better argument handling
1) Split a path.name argument at the last '.' that
   is not part of the path.

2) Try various importers always in the same order
   for consistent results (use lists instead of maps).

LGTM=adonovan
R=adonovan
CC=golang-codereviews
https://golang.org/cl/80790043
2014-03-26 09:54:20 -07:00
Robert Griesemer
8648e1a481 go.tools/cmd/godex: nicer formatting
- handle indentation
- write non-empty tuples and signatures in multiple lines
- don't crash for package unsafe

LGTM=adonovan
R=adonovan
CC=golang-codereviews
https://golang.org/cl/79920044
2014-03-26 08:38:40 -07:00
Robert Griesemer
4a27ee3a1b go.tools/cmd/godex: a tool to dump export information
Initial implementation. Lots of missing pieces.

Example use:
        godex math
        godex math.Sin
        godex math.Sin math.Cos

LGTM=adonovan
R=adonovan
CC=golang-codereviews
https://golang.org/cl/76890044
2014-03-25 15:26:38 -07:00