From: Russ Cox Date: Thu, 31 Jan 2013 22:37:47 +0000 (-0800) Subject: cmd/vet: add missing -all logic X-Git-Tag: go1.1rc2~1208 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=c0e805efd24753936b7367d40b25491af2d6441d;p=gostls13.git cmd/vet: add missing -all logic R=golang-dev, cookieo9, bradfitz CC=golang-dev https://golang.org/cl/7260043 --- diff --git a/src/cmd/vet/main.go b/src/cmd/vet/main.go index 2f254f3e08..22e3073869 100644 --- a/src/cmd/vet/main.go +++ b/src/cmd/vet/main.go @@ -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 }