OLD | NEW |
1 // Copyright 2010 The Go Authors. All rights reserved. | 1 // Copyright 2010 The Go Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style | 2 // Use of this source code is governed by a BSD-style |
3 // license that can be found in the LICENSE file. | 3 // license that can be found in the LICENSE file. |
4 | 4 |
5 /* | 5 /* |
6 | 6 |
7 Vet examines Go source code and reports suspicious constructs, such as Printf | 7 Vet examines Go source code and reports suspicious constructs, such as Printf |
8 calls whose arguments do not align with the format string. Vet uses heuristics | 8 calls whose arguments do not align with the format string. Vet uses heuristics |
9 that do not guarantee all reports are genuine problems, but it can find errors | 9 that do not guarantee all reports are genuine problems, but it can find errors |
10 not caught by the compilers. | 10 not caught by the compilers. |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
137 Misuse of unsafe Pointers | 137 Misuse of unsafe Pointers |
138 | 138 |
139 Flag: -unsafeptr | 139 Flag: -unsafeptr |
140 | 140 |
141 Likely incorrect uses of unsafe.Pointer to convert integers to pointers. | 141 Likely incorrect uses of unsafe.Pointer to convert integers to pointers. |
142 A conversion from uintptr to unsafe.Pointer is invalid if it implies that | 142 A conversion from uintptr to unsafe.Pointer is invalid if it implies that |
143 there is a uintptr-typed word in memory that holds a pointer value, | 143 there is a uintptr-typed word in memory that holds a pointer value, |
144 because that word will be invisible to stack copying and to the garbage | 144 because that word will be invisible to stack copying and to the garbage |
145 collector. | 145 collector. |
146 | 146 |
| 147 Finalizer functions |
| 148 |
| 149 Flag: -finalizers |
| 150 |
| 151 Finalizer functions that refer directly to the objects that they finalize. |
| 152 This causes the object to never be garbage collected. |
| 153 |
147 Other flags | 154 Other flags |
148 | 155 |
149 These flags configure the behavior of vet: | 156 These flags configure the behavior of vet: |
150 | 157 |
151 -all (default true) | 158 -all (default true) |
152 Check everything; disabled if any explicit check is requested. | 159 Check everything; disabled if any explicit check is requested. |
153 -v | 160 -v |
154 Verbose mode | 161 Verbose mode |
155 -printfuncs | 162 -printfuncs |
156 A comma-separated list of print-like functions to supplement | 163 A comma-separated list of print-like functions to supplement |
157 the standard list. Each entry is in the form Name:N where N | 164 the standard list. Each entry is in the form Name:N where N |
158 is the zero-based argument position of the first argument | 165 is the zero-based argument position of the first argument |
159 involved in the print: either the format or the first print | 166 involved in the print: either the format or the first print |
160 argument for non-formatted prints. For example, | 167 argument for non-formatted prints. For example, |
161 if you have Warn and Warnf functions that take an | 168 if you have Warn and Warnf functions that take an |
162 io.Writer as their first argument, like Fprintf, | 169 io.Writer as their first argument, like Fprintf, |
163 -printfuncs=Warn:1,Warnf:1 | 170 -printfuncs=Warn:1,Warnf:1 |
164 -shadowstrict | 171 -shadowstrict |
165 Whether to be strict about shadowing; can be noisy. | 172 Whether to be strict about shadowing; can be noisy. |
166 -test | 173 -test |
167 For testing only: sets -all and -shadow. | 174 For testing only: sets -all and -shadow. |
168 */ | 175 */ |
169 package main | 176 package main |
OLD | NEW |