Skip to content

Proposal: check for unused //nolint comments #832

Closed
@vearutop

Description

@vearutop

Sometimes the code needs a//nolint suppressor to disable check(s), but as the code evolves the //nolintmay become redundant.

For example such comment may become obsolete when the symbol is actually used:

// MyConst is something special.
// nolint:unused // To be used in subsequent PR.
const MyConst = "my-const"

I would like to check that //nolint comment was relevant to at least one linting issue and emit lint error otherwise.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: nolintRelated to nolint directive and nolintlintenhancementNew feature or improvement

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions