Skip to content

False positive on empty select block #698

Closed
@nobu-k

Description

@nobu-k

Describe the bug

empty-block complains about select {} that empty-block: this block is empty, you can remove it.

To Reproduce

select {}

Expected behavior

It shouldn't be an error as it's a valid way to block forever.

Logs

empty-block: this block is empty, you can remove it (revive)

Desktop (please complete the following information):

  • OS: Ubuntu 20.04
  • Version of Go: 1.18.1

Additional context

I used revive via golangci-lint 1.45.2.

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