blob: 6573ae3ebdffeaef50e901dd7fe3a4393653ecbb (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
|
# Package with external tests
! go vet m/vetpkg
stderr 'Printf'
# With tags
! go vet -tags tagtest m/vetpkg
stderr 'c\.go.*Printf'
# With flags on
! go vet -printf m/vetpkg
stderr 'Printf'
# With flags off
go vet -printf=false m/vetpkg
! stderr .
# With only test files (tests issue #23395)
go vet m/onlytest
! stderr .
# With only cgo files (tests issue #24193)
[!cgo] skip
[short] skip
go vet m/onlycgo
! stderr .
-- go.mod --
module m
go 1.16
-- vetpkg/a_test.go --
package p_test
-- vetpkg/b.go --
package p
import "fmt"
func f() {
fmt.Printf("%d")
}
-- vetpkg/c.go --
// +build tagtest
package p
import "fmt"
func g() {
fmt.Printf("%d", 3, 4)
}
-- onlytest/p_test.go --
package p
import "testing"
func TestMe(*testing.T) {}
-- onlycgo/p.go --
package p
import "C"
func F() {}
|