Skip to content

Commit cc7b4b3

Browse files
Antonboomtimothy-king
authored andcommitted
cmd/vet: add lost checks in doc
Change-Id: Iacbcb582e263149fede734822cba2df4b8162968 Reviewed-on: https://go-review.googlesource.com/c/go/+/544015 Reviewed-by: Cherry Mui <[email protected]> TryBot-Result: Gopher Robot <[email protected]> Run-TryBot: Tim King <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]>
1 parent 841e63e commit cc7b4b3

File tree

1 file changed

+32
-22
lines changed

1 file changed

+32
-22
lines changed

src/cmd/vet/doc.go

Lines changed: 32 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -27,28 +27,38 @@ program correctness.
2727
2828
To list the available checks, run "go tool vet help":
2929
30-
asmdecl report mismatches between assembly files and Go declarations
31-
assign check for useless assignments
32-
atomic check for common mistakes using the sync/atomic package
33-
bools check for common mistakes involving boolean operators
34-
buildtag check that +build tags are well-formed and correctly located
35-
cgocall detect some violations of the cgo pointer passing rules
36-
composites check for unkeyed composite literals
37-
copylocks check for locks erroneously passed by value
38-
httpresponse check for mistakes using HTTP responses
39-
loopclosure check references to loop variables from within nested functions
40-
lostcancel check cancel func returned by context.WithCancel is called
41-
nilfunc check for useless comparisons between functions and nil
42-
printf check consistency of Printf format strings and arguments
43-
shift check for shifts that equal or exceed the width of the integer
44-
slog check for incorrect arguments to log/slog functions
45-
stdmethods check signature of methods of well-known interfaces
46-
structtag check that struct field tags conform to reflect.StructTag.Get
47-
tests check for common mistaken usages of tests and examples
48-
unmarshal report passing non-pointer or non-interface values to unmarshal
49-
unreachable check for unreachable code
50-
unsafeptr check for invalid conversions of uintptr to unsafe.Pointer
51-
unusedresult check for unused results of calls to some functions
30+
appends check for missing values after append
31+
asmdecl report mismatches between assembly files and Go declarations
32+
assign check for useless assignments
33+
atomic check for common mistakes using the sync/atomic package
34+
bools check for common mistakes involving boolean operators
35+
buildtag check //go:build and // +build directives
36+
cgocall detect some violations of the cgo pointer passing rules
37+
composites check for unkeyed composite literals
38+
copylocks check for locks erroneously passed by value
39+
defers report common mistakes in defer statements
40+
directive check Go toolchain directives such as //go:debug
41+
errorsas report passing non-pointer or non-error values to errors.As
42+
framepointer report assembly that clobbers the frame pointer before saving it
43+
httpresponse check for mistakes using HTTP responses
44+
ifaceassert detect impossible interface-to-interface type assertions
45+
loopclosure check references to loop variables from within nested functions
46+
lostcancel check cancel func returned by context.WithCancel is called
47+
nilfunc check for useless comparisons between functions and nil
48+
printf check consistency of Printf format strings and arguments
49+
shift check for shifts that equal or exceed the width of the integer
50+
sigchanyzer check for unbuffered channel of os.Signal
51+
slog check for invalid structured logging calls
52+
stdmethods check signature of methods of well-known interfaces
53+
stringintconv check for string(int) conversions
54+
structtag check that struct field tags conform to reflect.StructTag.Get
55+
testinggoroutine report calls to (*testing.T).Fatal from goroutines started by a test
56+
tests check for common mistaken usages of tests and examples
57+
timeformat check for calls of (time.Time).Format or time.Parse with 2006-02-01
58+
unmarshal report passing non-pointer or non-interface values to unmarshal
59+
unreachable check for unreachable code
60+
unsafeptr check for invalid conversions of uintptr to unsafe.Pointer
61+
unusedresult check for unused results of calls to some functions
5262
5363
For details and flags of a particular check, such as printf, run "go tool vet help printf".
5464

0 commit comments

Comments
 (0)