From 8cb0d02132ec15eea60276edade84bbd89ad3dca Mon Sep 17 00:00:00 2001 From: Leigh McCulloch Date: Sun, 10 Nov 2019 03:12:42 +0000 Subject: [PATCH] go/analysis/unitchecker: add erroras analysis to align with go vet Add `erroras` analysis to the `unitchecker` example that mimics go vet. The unitchecker according to its comments is an example of replicating the analysis performed by go vet using the unitchecker. The example is missing the erroras analysis that was added to go vet in golang/go@9f76566. This change brings the example back inline with the analysis performed by go vet. Close golang/go#35486 Change-Id: I630146b60c1e62b4685fb173c8c4736d9d713168 GitHub-Last-Rev: 7c3fd4ac8e2465514720238d2c3c1ffb22a6278f GitHub-Pull-Request: golang/tools#185 Reviewed-on: https://go-review.googlesource.com/c/tools/+/206238 Reviewed-by: Michael Matloob --- go/analysis/unitchecker/main.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/go/analysis/unitchecker/main.go b/go/analysis/unitchecker/main.go index 844e8f3dac..a1fe3d38d5 100644 --- a/go/analysis/unitchecker/main.go +++ b/go/analysis/unitchecker/main.go @@ -22,6 +22,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/errorsas" "golang.org/x/tools/go/analysis/passes/httpresponse" "golang.org/x/tools/go/analysis/passes/loopclosure" "golang.org/x/tools/go/analysis/passes/lostcancel" @@ -47,6 +48,7 @@ func main() { cgocall.Analyzer, composite.Analyzer, copylock.Analyzer, + errorsas.Analyzer, httpresponse.Analyzer, loopclosure.Analyzer, lostcancel.Analyzer,