Skip to content

Commit

Permalink
cmd/vet: add defers analysis pass
Browse files Browse the repository at this point in the history
Fixes #60048

Change-Id: I1553de35d5ebd9c7df9727242e888de91caca4ea
Reviewed-on: https://go-review.googlesource.com/c/go/+/527095
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Alan Donovan <adonovan@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Tim King <taking@google.com>
Reviewed-by: Tim King <taking@google.com>
  • Loading branch information
devoxel authored and timothy-king committed Sep 25, 2023
1 parent bc9da01 commit a5f1d02
Show file tree
Hide file tree
Showing 5 changed files with 90 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/cmd/go/internal/test/flagdefs.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

25 changes: 25 additions & 0 deletions src/cmd/vendor/golang.org/x/tools/go/analysis/passes/defers/doc.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions src/cmd/vendor/modules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ golang.org/x/tools/go/analysis/passes/cgocall
golang.org/x/tools/go/analysis/passes/composite
golang.org/x/tools/go/analysis/passes/copylock
golang.org/x/tools/go/analysis/passes/ctrlflow
golang.org/x/tools/go/analysis/passes/defers
golang.org/x/tools/go/analysis/passes/directive
golang.org/x/tools/go/analysis/passes/errorsas
golang.org/x/tools/go/analysis/passes/framepointer
Expand Down
2 changes: 2 additions & 0 deletions src/cmd/vet/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import (
"golang.org/x/tools/go/analysis/passes/cgocall"
"golang.org/x/tools/go/analysis/passes/composite"
"golang.org/x/tools/go/analysis/passes/copylock"
"golang.org/x/tools/go/analysis/passes/defers"
"golang.org/x/tools/go/analysis/passes/directive"
"golang.org/x/tools/go/analysis/passes/errorsas"
"golang.org/x/tools/go/analysis/passes/framepointer"
Expand Down Expand Up @@ -53,6 +54,7 @@ func main() {
cgocall.Analyzer,
composite.Analyzer,
copylock.Analyzer,
defers.Analyzer,
directive.Analyzer,
errorsas.Analyzer,
framepointer.Analyzer,
Expand Down

0 comments on commit a5f1d02

Please sign in to comment.