Open kunwardeep opened 4 years ago
Thank you for reporting and using tparallel
in golangci-lint
!
However, that's the intended behavior. It's not compulsory to use t.Parallel()
, so this linter doesn't warn when t.Parallel()
is not called in both a top-level test and sub-tests.
tparallel
alerts only when you intend to parallelize tests, but you are not using t.Parallel()
efficiently.
So how do I make the linter complain about the test above ?
How to reproduce
1> go get github.com/golangci/golangci-lint/cmd/golangci-lint@master (as the latest change is not in the release) 2> Set the linter to use tParallel 3> Run golangci-lint run ./...
Code to run the tests on
I would've expected the linter to tell me that there is no t.Parallel being called.