Skip to content

False positive on const missing comment #691

Closed
@MarcelXia

Description

@MarcelXia

Describe the bug
False positive : exported const TTLkey should have comment (or a comment on this block) or be unexported

To Reproduce

const (
	TTLKey       = "ttl"    // Tome to live key
)

When the comment is above it, it won't complain, but when it is after it (same line) it complains.

Using revive 1.2.1
Command:
revive -formatter friendly -exclude ./vendor/... ./...

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions