mirror of
https://github.com/golang/go
synced 2024-11-26 23:41:37 -07:00
cmd/vet: add missing -all logic
R=golang-dev, cookieo9, bradfitz CC=golang-dev https://golang.org/cl/7260043
This commit is contained in:
parent
0cb0f6d090
commit
c0e805efd2
@ -25,7 +25,8 @@ import (
|
||||
var verbose = flag.Bool("v", false, "verbose")
|
||||
var exitCode = 0
|
||||
|
||||
// Flags to control which checks to perform
|
||||
// Flags to control which checks to perform.
|
||||
// NOTE: Add new flags to the if statement at the top of func main too.
|
||||
var (
|
||||
vetAll = flag.Bool("all", true, "check everything; disabled if any explicit check is requested")
|
||||
vetAtomic = flag.Bool("atomic", false, "check for common mistaken usages of the sync/atomic package")
|
||||
@ -65,7 +66,7 @@ func main() {
|
||||
flag.Parse()
|
||||
|
||||
// If a check is named explicitly, turn off the 'all' flag.
|
||||
if *vetMethods || *vetPrintf || *vetStructTags || *vetUntaggedLiteral || *vetRangeLoops {
|
||||
if *vetAtomic || *vetBuildTags || *vetMethods || *vetPrintf || *vetStructTags || *vetRangeLoops || *vetUntaggedLiteral {
|
||||
*vetAll = false
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user