]> Cypherpunks repositories - gostls13.git/commit
cmd: add a new analyzer for check missing values after append
authorcui fliter <imcusg@gmail.com>
Fri, 26 May 2023 04:02:54 +0000 (12:02 +0800)
committerTim King <taking@google.com>
Tue, 3 Oct 2023 20:55:20 +0000 (20:55 +0000)
commitdc523c8ddf5b0ce985ea90c65cbaa097c9e3ee09
tree46f66080b162b271358769791f9405d465ca948a
parente9379a8f8bd5f00463f67fe7e052cbcb262b169a
cmd: add a new analyzer for check missing values after append

If there is no second parameter added during append, there will be no prompt when executing go vet. Add an analyzer to detect this situation

Update #60448

Change-Id: If9848835424f310c54e3e9377aaaad4a1516871a
Reviewed-on: https://go-review.googlesource.com/c/go/+/498416
Run-TryBot: shuang cui <imcusg@gmail.com>
Run-TryBot: Tim King <taking@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Michael Matloob <matloob@golang.org>
Reviewed-by: Tim King <taking@google.com>
Reviewed-by: Alan Donovan <adonovan@google.com>
src/cmd/go/internal/test/flagdefs.go
src/cmd/vendor/golang.org/x/tools/go/analysis/passes/appends/appends.go [new file with mode: 0644]
src/cmd/vendor/golang.org/x/tools/go/analysis/passes/appends/doc.go [new file with mode: 0644]
src/cmd/vendor/modules.txt
src/cmd/vet/main.go
src/cmd/vet/testdata/appends/appends.go [new file with mode: 0644]
src/cmd/vet/vet_test.go