• Russ Cox's avatar
    cmd/vet: limit printf check to known Printf-like functions · 558eeb2d
    Russ Cox authored
    The name-based heuristics fail too often to be on during "go test",
    but we really want the printf vet check in "go test", so change to
    a list of exactly which standard library functions are print-like.
    
    For a later release we'd like to bring back checking for user-defined
    wrappers, but in a completely precise way. Not for Go 1.10, though.
    
    The new, more precise list includes t.Skipf, which caught some
    mistakes in standard library tests.
    
    Fixes #22936.
    
    Change-Id: I110448e3f6b75afd4327cf87b6abb4cc2021fd0d
    Reviewed-on: https://go-review.googlesource.com/83838
    Run-TryBot: Russ Cox <rsc@golang.org>
    Reviewed-by: 's avatarRob Pike <r@golang.org>
    Reviewed-by: 's avatarIan Lance Taylor <iant@golang.org>
    558eeb2d
vet_test.go 5.34 KB