Skip to content

Commit 32b879c

Browse files
doc: explain how to use "go vet -shadow"
Fixes #29260 Change-Id: I419b74d06380113f4bd32b9aeb053c3be36208d5 Reviewed-on: https://go-review.googlesource.com/c/154584 Reviewed-by: Alan Donovan <[email protected]>
1 parent 0648424 commit 32b879c

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

doc/go1.12.html

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,16 @@ <h3 id="vet"><code>go tool vet</code> no longer supported</h3>
9393
vet</code> should work with all supported versions of Go.
9494
</p>
9595

96+
<p>
97+
As part of this change, the experimental <code>-shadow</code> option
98+
is no longer available with <code>go vet</code>. Checking for
99+
variable shadowing may now be done using
100+
<pre>
101+
go install golang.org/x/tools/go/analysis/passes/shadow/cmd/shadow
102+
go vet -vettool=$(which shadow)
103+
</pre>
104+
</p>
105+
96106
<h3 id="gocache">Build cache requirement</h3>
97107

98108
<p>

0 commit comments

Comments
 (0)