# Package with external tests
! go vet vetpkg
stderr 'Printf'

# With tags
! go vet -tags tagtest vetpkg
stderr 'c\.go.*Printf'

# With flags on
! go vet -printf vetpkg
stderr 'Printf'

# With flags off
go vet -printf=false vetpkg
! stderr .

# With only test files (tests issue #23395)
go vet onlytest
! stderr .

# With only cgo files (tests issue #24193)
[!cgo] skip
[short] skip
go vet onlycgo
! stderr .

-- 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() {}