Skip to content

Commit a24facf

Browse files
timothy-kingGo LUCI
authored and
Go LUCI
committed
all: set gotypesalias=0 explicitly
Set GODEBUG variable gotypesalias to off in all main packages in x/tools that use go/types. This is a no-op as the x/tools go.mod is uses version 1.22, which disables gotypesalias in main packages and tests by default. Change-Id: I1593cd63ec018e230e126d990530bd59fb9a96cf Reviewed-on: https://go-review.googlesource.com/c/tools/+/617095 LUCI-TryBot-Result: Go LUCI <[email protected]> Commit-Queue: Tim King <[email protected]> Reviewed-by: Robert Findley <[email protected]>
1 parent ce2a33e commit a24facf

File tree

25 files changed

+71
-0
lines changed

25 files changed

+71
-0
lines changed

cmd/bundle/main.go

+3
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,9 @@
6868
// Update all bundles in the standard library:
6969
//
7070
// go generate -run bundle std
71+
72+
//go:debug gotypesalias=0
73+
7174
package main
7275

7376
import (

cmd/callgraph/main.go

+3
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44

55
// callgraph: a tool for reporting the call graph of a Go program.
66
// See Usage for details, or run with -help.
7+
8+
//go:debug gotypesalias=0
9+
710
package main // import "golang.org/x/tools/cmd/callgraph"
811

912
// TODO(adonovan):

cmd/deadcode/deadcode.go

+2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
// Use of this source code is governed by a BSD-style
33
// license that can be found in the LICENSE file.
44

5+
//go:debug gotypesalias=0
6+
57
package main
68

79
import (

cmd/eg/eg.go

+3
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55
// The eg command performs example-based refactoring.
66
// For documentation, run the command, or see Help in
77
// golang.org/x/tools/refactor/eg.
8+
9+
//go:debug gotypesalias=0
10+
811
package main // import "golang.org/x/tools/cmd/eg"
912

1013
import (

cmd/godex/godex.go

+2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
// Use of this source code is governed by a BSD-style
33
// license that can be found in the LICENSE file.
44

5+
//go:debug gotypesalias=0
6+
57
package main
68

79
import (

cmd/godoc/main.go

+2
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
// http://godoc/pkg/compress/zlib)
1515
//
1616

17+
//go:debug gotypesalias=0
18+
1719
package main
1820

1921
import (

cmd/goimports/goimports.go

+2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
// Use of this source code is governed by a BSD-style
33
// license that can be found in the LICENSE file.
44

5+
//go:debug gotypesalias=0
6+
57
package main
68

79
import (

cmd/gomvpkg/main.go

+3
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44

55
// The gomvpkg command moves go packages, updating import declarations.
66
// See the -help message or Usage constant for details.
7+
8+
//go:debug gotypesalias=0
9+
710
package main
811

912
import (

cmd/gotype/gotype.go

+3
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,9 @@ To verify the output of a pipe:
8585
8686
echo "package foo" | gotype
8787
*/
88+
89+
//go:debug gotypesalias=0
90+
8891
package main
8992

9093
import (

cmd/ssadump/main.go

+3
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
// license that can be found in the LICENSE file.
44

55
// ssadump: a tool for displaying and interpreting the SSA form of Go programs.
6+
7+
//go:debug gotypesalias=0
8+
69
package main // import "golang.org/x/tools/cmd/ssadump"
710

811
import (

cmd/stringer/stringer.go

+3
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,9 @@
7070
// PillAspirin // Aspirin
7171
//
7272
// to suppress it in the output.
73+
74+
//go:debug gotypesalias=0
75+
7376
package main // import "golang.org/x/tools/cmd/stringer"
7477

7578
import (

go/analysis/passes/defers/cmd/defers/main.go

+3
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
// license that can be found in the LICENSE file.
44

55
// The defers command runs the defers analyzer.
6+
7+
//go:debug gotypesalias=0
8+
69
package main
710

811
import (

go/analysis/passes/fieldalignment/cmd/fieldalignment/main.go

+3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
// Copyright 2021 The Go Authors. All rights reserved.
22
// Use of this source code is governed by a BSD-style
33
// license that can be found in the LICENSE file.
4+
5+
//go:debug gotypesalias=0
6+
47
package main
58

69
import (

go/analysis/passes/findcall/cmd/findcall/main.go

+3
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
// license that can be found in the LICENSE file.
44

55
// The findcall command runs the findcall analyzer.
6+
7+
//go:debug gotypesalias=0
8+
69
package main
710

811
import (

go/analysis/passes/httpmux/cmd/httpmux/main.go

+3
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
// license that can be found in the LICENSE file.
44

55
// The httpmux command runs the httpmux analyzer.
6+
7+
//go:debug gotypesalias=0
8+
69
package main
710

811
import (

go/analysis/passes/ifaceassert/cmd/ifaceassert/main.go

+3
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
// license that can be found in the LICENSE file.
44

55
// The ifaceassert command runs the ifaceassert analyzer.
6+
7+
//go:debug gotypesalias=0
8+
69
package main
710

811
import (

go/analysis/passes/lostcancel/cmd/lostcancel/main.go

+3
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44

55
// The lostcancel command applies the golang.org/x/tools/go/analysis/passes/lostcancel
66
// analysis to the specified packages of Go source code.
7+
8+
//go:debug gotypesalias=0
9+
710
package main
811

912
import (

go/analysis/passes/nilness/cmd/nilness/main.go

+3
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44

55
// The nilness command applies the golang.org/x/tools/go/analysis/passes/nilness
66
// analysis to the specified packages of Go source code.
7+
8+
//go:debug gotypesalias=0
9+
710
package main
811

912
import (

go/analysis/passes/shadow/cmd/shadow/main.go

+3
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
// license that can be found in the LICENSE file.
44

55
// The shadow command runs the shadow analyzer.
6+
7+
//go:debug gotypesalias=0
8+
69
package main
710

811
import (

go/analysis/passes/stringintconv/cmd/stringintconv/main.go

+3
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
// license that can be found in the LICENSE file.
44

55
// The stringintconv command runs the stringintconv analyzer.
6+
7+
//go:debug gotypesalias=0
8+
69
package main
710

811
import (

go/analysis/passes/unmarshal/cmd/unmarshal/main.go

+3
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
// license that can be found in the LICENSE file.
44

55
// The unmarshal command runs the unmarshal analyzer.
6+
7+
//go:debug gotypesalias=0
8+
69
package main
710

811
import (

go/analysis/passes/unusedresult/cmd/unusedresult/main.go

+3
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44

55
// The unusedresult command applies the golang.org/x/tools/go/analysis/passes/unusedresult
66
// analysis to the specified packages of Go source code.
7+
8+
//go:debug gotypesalias=0
9+
710
package main
811

912
import (

go/packages/gopackages/main.go

+3
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@
66
// how to use golang.org/x/tools/go/packages to load, parse,
77
// type-check, and print one or more Go packages.
88
// Its precise output is unspecified and may change.
9+
10+
//go:debug gotypesalias=0
11+
912
package main
1013

1114
import (

go/packages/internal/nodecount/nodecount.go

+3
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@
1313
// A typical distribution is 40% identifiers, 10% literals, 8%
1414
// selectors, and 6% calls; around 3% each of BinaryExpr, BlockStmt,
1515
// AssignStmt, Field, and Comment; and the rest accounting for 20%.
16+
17+
//go:debug gotypesalias=0
18+
1619
package main
1720

1821
import (

go/types/internal/play/play.go

+3
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@
99
// It is intended for convenient exploration and debugging of
1010
// go/types. The command and its web interface are not officially
1111
// supported and they may be changed arbitrarily in the future.
12+
13+
//go:debug gotypesalias=0
14+
1215
package main
1316

1417
import (

0 commit comments

Comments
 (0)