Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
G
golang
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
golang
Commits
df3a8410
Commit
df3a8410
authored
Feb 29, 2012
by
Shenghou Ma
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
doc: elaborate available checks for cmd/vet
R=golang-dev, r, ality, r CC=golang-dev
https://golang.org/cl/5709053
parent
3684ae9d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
2 deletions
+26
-2
doc.go
src/cmd/vet/doc.go
+26
-2
No files found.
src/cmd/vet/doc.go
View file @
df3a8410
...
...
@@ -4,18 +4,42 @@
/*
Vet does simple checking of Go source code.
Vet examines Go source code and reports suspicious constructs, such as Printf
calls whose arguments do not align with the format string. Vet uses heuristics
that do not guarantee all reports are genuine problems, but it can find errors
not caught by the compilers.
It checks for simple errors in calls to functions named
Available checks:
1. Printf family
Suspicious calls to functions in the Printf familiy, including any functions
with these names:
Print Printf Println
Fprint Fprintf Fprintln
Sprint Sprintf Sprintln
Error Errorf
Fatal Fatalf
Panic Panicf Panicln
If the function name ends with an 'f', the function is assumed to take
a format descriptor string in the manner of fmt.Printf. If not, vet
complains about arguments that look like format descriptor strings.
It also checks for errors such as using a Writer as the first argument of
Printf.
2. Methods
Non-standard signatures for methods with familiar names, including:
Format GobEncode GobDecode MarshalJSON MarshalXML
Peek ReadByte ReadFrom ReadRune Scan Seek
UnmarshalJSON UnreadByte UnreadRune WriteByte
WriteTo
3. Struct tags
Struct tags that do not follow the format understood by reflect.StructTag.Get.
Usage:
go tool vet [flag] [file.go ...]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment