From 23984592fec6c30afc42cb38a146ad93922df564 Mon Sep 17 00:00:00 2001 From: Alan Donovan Date: Fri, 16 Nov 2018 14:00:34 -0500 Subject: [PATCH] go/analysis/cmd/vet: remove pkgfact, findcall analyzers The suite used by this tool matters to GOROOT/src/cmd/vet/all and the 'vetall' builder. Add a comment to this effect. Change-Id: I2e16eb670b03a7bae8224625baaebd1298e2424c Reviewed-on: https://go-review.googlesource.com/c/150040 Reviewed-by: Michael Matloob --- go/analysis/cmd/vet/vet.go | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/go/analysis/cmd/vet/vet.go b/go/analysis/cmd/vet/vet.go index db8180ba13..d00fb64659 100644 --- a/go/analysis/cmd/vet/vet.go +++ b/go/analysis/cmd/vet/vet.go @@ -25,13 +25,11 @@ 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/findcall" "golang.org/x/tools/go/analysis/passes/httpresponse" "golang.org/x/tools/go/analysis/passes/loopclosure" "golang.org/x/tools/go/analysis/passes/lostcancel" "golang.org/x/tools/go/analysis/passes/nilfunc" "golang.org/x/tools/go/analysis/passes/nilness" - "golang.org/x/tools/go/analysis/passes/pkgfact" "golang.org/x/tools/go/analysis/passes/printf" "golang.org/x/tools/go/analysis/passes/shift" "golang.org/x/tools/go/analysis/passes/stdmethods" @@ -44,6 +42,10 @@ import ( ) func main() { + // This suite of analyzers is applied to all code + // in GOROOT by GOROOT/src/cmd/vet/all. When adding + // a new analyzer, update the whitelist used by vet/all, + // or change its vet command to disable the new analyzer. multichecker.Main( // the traditional vet suite: asmdecl.Analyzer, @@ -69,8 +71,8 @@ func main() { unusedresult.Analyzer, // for debugging: - findcall.Analyzer, - pkgfact.Analyzer, + // findcall.Analyzer, + // pkgfact.Analyzer, // uses SSA: nilness.Analyzer,