• Alan Donovan's avatar
    cmd/vet/all: use x/tools/go/analysis/cmd/vet not cmd/vet · b2df0bd5
    Alan Donovan authored
    cmd/vet/all applies vet to all packages in the standard tree.
    It is run for every configuration using this command:
      GO_BUILDER_NAME=misc-vetall go tool dist test
    by the misc-vetall builder (see chart at build.golang.org).
    
    Ideally we would switch to 'go vet', but it effectively does a partial
    build. This means that its analysis has accurate type information, so
    it reports slightly fewer spurious diagnostics. However, it is more
    than twice as slow.
    
    Instead, cmd/vet/all builds and runs
    golang.org/x/tools/go/analysis/cmd/vet, which uses x/tools/go/packages
    to load the entire std lib from source. It takes about 4min to run all
    OS/ARCH pairs. An important consequence is that golang.org/x/tools
    must be on your $GOPATH to run cmd/vet/all. The test has been
    temporarily modified to warn and skip if this is not the case.
    
    This is a preparatory step for switching to the new
    cmd/vet based on vet-lite.
    
    Whitelist changes:
    - The two "deadcode" diagnostics removed from the whitelist were due
      to if-conditions that could now be proven false.
    - The asmdecl warnings are now printed with the log.Printf prefix,
      so they are discarded by the parser and needn't be whitelisted.
    
    Change-Id: I6486508b0de2cd947c897523af086a408cbaf4a8
    Reviewed-on: https://go-review.googlesource.com/c/149097Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
    Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    b2df0bd5
Name
Last commit
Last update
..
whitelist Loading commit data...
main.go Loading commit data...