Skip to content

Add "nosleep" linter #3958

@powerman

Description

@powerman

Your feature request related to a problem? Please describe.

Using time.Sleep in tests is a mistake in most of cases.

Describe the solution you'd like.

Linter should detect time.Sleep in tests.

Describe alternatives you've considered.

TBH as golangci-link contains nearly hundred of linters it's hard to say is some of existing ones can be configured to do this.

Additional context.

https://xeiaso.net/blog/nosleep

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions