No description
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2018-08-18 21:14:08 +03:00
all init from commit 52085d1ca4a7b0f394b0fd748c963f1334c9e8ab 2018-05-05 22:17:12 +03:00
lib make API 2018-05-06 09:49:38 +03:00
testdata init from commit 52085d1ca4a7b0f394b0fd748c963f1334c9e8ab 2018-05-05 22:17:12 +03:00
asmdecl.go make API 2018-05-06 09:49:38 +03:00
assign.go make API 2018-05-06 09:49:38 +03:00
atomic.go make API 2018-05-06 09:49:38 +03:00
bool.go make API 2018-05-06 09:49:38 +03:00
buildtag.go make API 2018-05-06 09:49:38 +03:00
cgo.go make API 2018-05-06 09:49:38 +03:00
composite.go fix package path comparison 2018-08-18 21:14:08 +03:00
copylock.go make API 2018-05-06 09:49:38 +03:00
dead.go make API 2018-05-06 09:49:38 +03:00
deadcode.go make API 2018-05-06 09:49:38 +03:00
doc.go make API 2018-05-06 09:49:38 +03:00
golangci.go pass astFilePathGetter 2018-07-29 22:18:25 +03:00
httpresponse.go make API 2018-05-06 09:49:38 +03:00
LICENSE make API 2018-05-06 09:49:38 +03:00
lostcancel.go make API 2018-05-06 09:49:38 +03:00
main.go pass astFilePathGetter 2018-07-29 22:18:25 +03:00
method.go make API 2018-05-06 09:49:38 +03:00
nilfunc.go make API 2018-05-06 09:49:38 +03:00
print.go make API 2018-05-06 09:49:38 +03:00
rangeloop.go make API 2018-05-06 09:49:38 +03:00
README init from commit 52085d1ca4a7b0f394b0fd748c963f1334c9e8ab 2018-05-05 22:17:12 +03:00
shadow.go make API 2018-05-06 09:49:38 +03:00
shift.go make API 2018-05-06 09:49:38 +03:00
structtag.go make API 2018-05-06 09:49:38 +03:00
tests.go make API 2018-05-06 09:49:38 +03:00
types.go use golang.org/x/tools/go/gcexportdata instead of importer.Default: support older go versions 2018-06-19 09:37:55 +03:00
unsafeptr.go make API 2018-05-06 09:49:38 +03:00
unused.go make API 2018-05-06 09:49:38 +03:00

Vet is a tool that checks correctness of Go programs. It runs a suite of tests,
each tailored to check for a particular class of errors. Examples include incorrect
Printf format verbs and malformed build tags.

Over time many checks have been added to vet's suite, but many more have been
rejected as not appropriate for the tool. The criteria applied when selecting which
checks to add are:

Correctness:

Vet's checks are about correctness, not style. A vet check must identify real or
potential bugs that could cause incorrect compilation or execution. A check that
only identifies stylistic points or alternative correct approaches to a situation
is not acceptable.

Frequency:

Vet is run every day by many programmers, often as part of every compilation or
submission. The cost in execution time is considerable, especially in aggregate,
so checks must be likely enough to find real problems that they are worth the
overhead of the added check. A new check that finds only a handful of problems
across all existing programs, even if the problem is significant, is not worth
adding to the suite everyone runs daily.

Precision:

Most of vet's checks are heuristic and can generate both false positives (flagging
correct programs) and false negatives (not flagging incorrect ones). The rate of
both these failures must be very small. A check that is too noisy will be ignored
by the programmer overwhelmed by the output; a check that misses too many of the
cases it's looking for will give a false sense of security. Neither is acceptable.
A vet check must be accurate enough that everything it reports is worth examining,
and complete enough to encourage real confidence.