Hi,

When I run 'go vet' on specific package with the 'analyzer' flag, its 
behavior seems to depend on where the command is invoked, can anyone please 
shed a light here, any code pointers that may help me understand the 
difference is highly appreciated.

1. under <go root>/src, -unreachable=false suppress the 'unreachable' 
warning as expected

$ go vet runtime/testdata/testprog
# runtime/testdata/testprog
runtime/testdata/testprog/deadlock.go:45:2: unreachable code
runtime/testdata/testprog/deadlock.go:50:2: unreachable code

$ go vet -unreachable=false runtime/testdata/testprog

2. under <go root>/, the flag doesn't take effect

$ go vet -unreachable=false runtime/testdata/testprog
# runtime/testdata/testprog
src/runtime/testdata/testprog/deadlock.go:45:2: unreachable code
src/runtime/testdata/testprog/deadlock.go:50:2: unreachable code


$ go vet runtime/testdata/testprog
# runtime/testdata/testprog
src/runtime/testdata/testprog/deadlock.go:45:2: unreachable code
src/runtime/testdata/testprog/deadlock.go:50:2: unreachable code

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/c278244e-2b80-40ac-bbad-fd129326782b%40googlegroups.com.

Reply via email to