Home | History | Annotate | only in /prebuilts/go/darwin-x86/src/cmd/vet
Up to higher level directory
NameDateSize
all/05-Oct-2017
asmdecl.go05-Oct-201719.1K
assign.go05-Oct-20171.2K
atomic.go05-Oct-20171.6K
bool.go05-Oct-20174.4K
buildtag.go05-Oct-20172.3K
cgo.go05-Oct-20173.6K
composite.go05-Oct-20171.9K
copylock.go05-Oct-20176.4K
deadcode.go05-Oct-20176.7K
doc.go05-Oct-20175.2K
httpresponse.go05-Oct-20174.2K
internal/05-Oct-2017
lostcancel.go05-Oct-20178.6K
main.go05-Oct-201713.1K
method.go05-Oct-20175.9K
nilfunc.go05-Oct-20171.4K
print.go05-Oct-201718.9K
rangeloop.go05-Oct-20171.7K
README05-Oct-20171.6K
shadow.go05-Oct-20176.9K
shift.go05-Oct-20171.9K
structtag.go05-Oct-20175K
testdata/05-Oct-2017
tests.go05-Oct-20174.8K
types.go05-Oct-20178.3K
unsafeptr.go05-Oct-20172.7K
unused.go05-Oct-20172.4K
vet_test.go05-Oct-20174.6K

README

      1 Vet is a tool that checks correctness of Go programs. It runs a suite of tests,
      2 each tailored to check for a particular class of errors. Examples include incorrect
      3 Printf format verbs or malformed build tags.
      4 
      5 Over time many checks have been added to vet's suite, but many more have been
      6 rejected as not appropriate for the tool. The criteria applied when selecting which
      7 checks to add are:
      8 
      9 Correctness:
     10 
     11 Vet's tools are about correctness, not style. A vet check must identify real or
     12 potential bugs that could cause incorrect compilation or execution. A check that
     13 only identifies stylistic points or alternative correct approaches to a situation
     14 is not acceptable.
     15 
     16 Frequency:
     17 
     18 Vet is run every day by many programmers, often as part of every compilation or
     19 submission. The cost in execution time is considerable, especially in aggregate,
     20 so checks must be likely enough to find real problems that they are worth the
     21 overhead of the added check. A new check that finds only a handful of problems
     22 across all existing programs, even if the problem is significant, is not worth
     23 adding to the suite everyone runs daily.
     24 
     25 Precision:
     26 
     27 Most of vet's checks are heuristic and can generate both false positives (flagging
     28 correct programs) and false negatives (not flagging incorrect ones). The rate of
     29 both these failures must be very small. A check that is too noisy will be ignored
     30 by the programmer overwhelmed by the output; a check that misses too many of the
     31 cases it's looking for will give a false sense of security. Neither is acceptable.
     32 A vet check must be accurate enough that everything it reports is worth examining,
     33 and complete enough to encourage real confidence.
     34