Repository: go
Issue: cmd/vet: should check unreachable code﻿ after t.FailNow or related functions
Labels: NeedsDecision,Analysis

<!--
Please answer these questions before submitting your issue. Thanks!
-->

### What version of Go are you using (`go version`)?

<pre>
$ go version
go version go1.18.4 darwin/amd64
</pre>

### Does this issue reproduce with the latest release?
Yes


### What operating system and processor architecture are you using (`go env`)?

<details><summary><code>go env</code> Output</summary><br><pre>
$ go env
GO111MODULE="auto"
GOARCH="amd64"
GOBIN="/usr/local/opt/go/libexec/bin"
GOCACHE="/Users/xxx/Library/Caches/go-build"
GOENV="/Users/xxx/Library/Application Support/go/env"
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOINSECURE=""
GOMODCACHE="/Users/fupeng/go/pkg/mod"
GONOPROXY="xxx"
GONOSUMDB="xxx"
GOOS="darwin"
GOPATH="/Users/fupeng/go"
GOPRIVATE="xxx"
GOPROXY="https://goproxy.cn"
GOROOT="/usr/local/opt/go/libexec"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/opt/go/libexec/pkg/tool/darwin_amd64"
GOVCS=""
GOVERSION="go1.18.4"
GCCGO="gccgo"
GOAMD64="v1"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD="/Users/xxx/go/src/revive/go.mod"
GOWORK=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -arch x86_64 -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/3v/mkwyck4x0f5bxv2gdv4_l8v00000gn/T/go-build2714321280=/tmp/go-build -gno-record-gcc-switches -fno-common"

</pre></details>

### What did you do?

<!--
If possible, provide a recipe for reproducing the error.
A complete runnable program is good.
A link on go.dev/play is best.
-->
should check unreachable code﻿ after t.SkipNow or t.FailNow or related functions.
I'm not quite sure if this is a bug or if it's designed that way. 
If it's a bug, I'd be happy to fix it and make it my first commit to the golang language.
example:
```go
func TestA(t *testing.T) {
	tests := make([]int, 100)
	for i := range tests {
		println("i: ", i)
		if i == 0 {
			t.Fatal("i == 0") // MATCH /unreachable code after this statement/
			println("unreachable")
			continue
		}
		if i == 1 {
			t.Fatalf("i:%d", i) // MATCH /unreachable code after this statement/
			println("unreachable")
			continue
		}
		if i == 2 {
			t.FailNow() // MATCH /unreachable code after this statement/
			println("unreachable")
			continue
		}
		/*  Thanks @dominikh 
                    Skip is used to temporarily skip tests. The code following it is intentionally unreachable.
			if i == 3 {
				t.Skip("i == 3") // MATCH /unreachable code after this statement/
				println("unreachable")
				continue
			}
			if i == 4 {
				t.Skipf("i:%d", i) // MATCH /unreachable code after this statement/
				println("unreachable")
				continue
			}
			if i == 5 {
				t.SkipNow() // MATCH /unreachable code after this statement/
				println("unreachable")
				continue
			}
		*/
	}
}

```

A practical example comes from the kubernetes tests. kubernetes project has used govet and golangci-lint for static detection.

https://github.com/kubernetes/kubernetes/blob/8b16a4a4df64d13c0e01015820de0245f493e90c/staging/src/k8s.io/apiserver/pkg/endpoints/apiserver_test.go#L2841-L2848

### What did you expect to see?
```bash
$ go vet -tests -unreachable ./...
# unreachable
./main_test.go:10:2: unreachable code  # detect it
```


### What did you see instead?
```bash
$ go vet -tests -unreachable ./...

```