moricho / tparallel

tparallel finds inappropriate usage of `t.Parallel()` method in your Go test codes
MIT License
24 stars 4 forks source link

Should not require parallel tests if `T.Setenv()` is called #25

Open gdavison opened 11 months ago

gdavison commented 11 months ago

According to the documentation for T.Setenv(), B.Setenv(), and F.Setenv()

Because Setenv affects the whole process, it cannot be used in parallel tests or tests with parallel ancestors.

Calls to Setenv will panic if called in a parallel test

The tparallel linter should not require parallel tests if Setenv is called in the function