Skip to content

Ignore tests that use t.Setenv or t.Chdir #49

@abemedia

Description

@abemedia

Both t.Setenv and t.Chdir are not compatible with t.Parallel. The linter should detect their use and omit tests that have them.

See the docs:

https://pkg.go.dev/testing#T.Setenv

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

https://pkg.go.dev/testing#T.Chdir

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions