mirror of
https://github.com/golang/go
synced 2024-11-18 16:14:46 -07:00
go/analysis/cmd/vet-lite: remove
The vet-lite tool was useful for developing the new cmd/vet but no longer needs to exist. This changes removes the command and moves the main.go file to the unitchecker directory where it serves as an example and can still be built for testing and debugging. See also https://go-review.googlesource.com/c/go/+/150297. Change-Id: Ic10c7cd3aeeaa2e1397dd81939616c6877f7005d Reviewed-on: https://go-review.googlesource.com/c/150298 Reviewed-by: Michael Matloob <matloob@golang.org> Reviewed-by: Daniel Martí <mvdan@mvdan.cc>
This commit is contained in:
parent
3d801af142
commit
d1f8dbfb0b
@ -18,7 +18,7 @@ string. It uses heuristics that do not guarantee all reports are
|
||||
genuine problems, but it can find errors not caught by the compilers.
|
||||
`
|
||||
|
||||
// Help implements the help subcommand for a multichecker or vet-lite
|
||||
// Help implements the help subcommand for a multichecker or unitchecker
|
||||
// style command. The optional args specify the analyzers to describe.
|
||||
// Help calls log.Fatal if no such analyzer exists.
|
||||
func Help(progname string, analyzers []*analysis.Analyzer, args []string) {
|
||||
|
@ -1,7 +1,12 @@
|
||||
// The vet-lite command is a driver for static checkers conforming to
|
||||
// the golang.org/x/tools/go/analysis API. It must be run by go vet:
|
||||
// +build ignore
|
||||
|
||||
// This file provides an example command for static checkers
|
||||
// conforming to the golang.org/x/tools/go/analysis API.
|
||||
// It serves as a model for the behavior of the cmd/vet tool in $GOROOT.
|
||||
// Being based on the unitchecker driver, it must be run by go vet:
|
||||
//
|
||||
// $ go vet -vettool=$(which vet-lite)
|
||||
// $ go build -o unitchecker main.go
|
||||
// $ go vet -vettool=unitchecker my/project/...
|
||||
//
|
||||
// For a checker also capable of running standalone, use multichecker.
|
||||
package main
|
||||
@ -32,21 +37,6 @@ import (
|
||||
"golang.org/x/tools/go/analysis/passes/unusedresult"
|
||||
)
|
||||
|
||||
// Legacy vet had the concept of "experimental" checkers. There
|
||||
// was exactly one, shadow, and it had to be explicitly enabled
|
||||
// by the -shadow flag, which would of course disable all the
|
||||
// other tristate flags, requiring the -all flag to reenable them.
|
||||
// (By itself, -all did not enable all checkers.)
|
||||
// The -all flag is no longer needed, so it is a no-op.
|
||||
//
|
||||
// The shadow analyzer has been removed from the suite,
|
||||
// but can be run using these additional commands:
|
||||
// $ go install golang.org/x/tools/go/analysis/passes/shadow/cmd/shadow
|
||||
// $ go vet -vettool=$(which shadow)
|
||||
// Alternatively, one could build a multichecker containing all
|
||||
// the desired checks (vet's suite + shadow) and run it in a
|
||||
// single "go vet" command.
|
||||
|
||||
func main() {
|
||||
unitchecker.Main(
|
||||
asmdecl.Analyzer,
|
Loading…
Reference in New Issue
Block a user