migrate icon indicating copy to clipboard operation
migrate copied to clipboard

Go vet failure in `testing/testing_test.go`

Open tspearconquest opened this issue 2 years ago • 2 comments

Describe the Bug Hi, I am new to go, working on trying to build migrate from the source.

I am getting a go vet failure in testing/testing_test.go despite //nolint:govet

~/go/src/github.com/golang-migrate/migrate master *1 ❯ go vet $(go list ./...)
# github.com/golang-migrate/migrate/v4/testing
testing/testing_test.go:7:1: ExampleParallelTest should be niladic

I checked in the file and found the comment which go vet is supposed to read and make it ignore the issue.

Any idea what I'm doing wrong?

Steps to Reproduce Steps to reproduce the behavior:

  1. Cloned the repo
  2. Ran go mod download
  3. Ran go vet $(go list ./...)

Expected Behavior No failures

Migrate Version n/a

Loaded Source Drivers n/a

Loaded Database Drivers n/a

Go Version go version go1.19.1 darwin/amd64

Stacktrace n/a

Additional context n/a

tspearconquest avatar Oct 22 '22 08:10 tspearconquest

I also tried with golang 1.18 but it happens there as well.

tspearconquest avatar Oct 22 '22 08:10 tspearconquest

As written in contribution guideline, this project uses golangci-lint and it aware //nolint:govet , however I try to change by #841 :)

As far as I know, go vet doesn't have a function to skip and it seems it will not in the future, too. https://github.com/golang/go/issues/17058#issuecomment-263406264

tsbkw avatar Oct 26 '22 11:10 tsbkw