Skip to content

Warn on unused hints #1651

@LeventErkok

Description

@LeventErkok

Some of my files have a bunch of hlint annotations at the bottom like so:

{- HLint ignore type FPOp "Use camelCase" -}
{- HLint ignore type PBOp "Use camelCase" -}
{- HLint ignore type OvOp "Use camelCase" -}
{- HLint ignore type NROp "Use camelCase" -}

These are collected over the years as I respectfully disagreed with hlint. But, as things evolve, some of these annotations become irrelevant in time: For instance I removed the NROp from that file a while ago but failed to remove the corresponding hint.

This is not a huge deal breaker, but I'm wondering if there's a switch to hlint which can "warn" me of unused module/function hints like this. Just like it warns about unused GHC language pragmas.

If such a feature doesn't exist, would it be costly to add it? Just a nicety, no big deal if it's a lot of work.

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