Skip to content

[core] Report unused violation suppression comments/annotations #2074

@oowekyala

Description

@oowekyala

From #2055 :

We currently report about suppressed violations, but we don't report about "unused suppression markers"

More generally, it would be nice to have a rule to detect unused @SuppressWarnings. Eg a @SuppressWarnings("unchecked") when a compiler wouldn't report any unchecked warning anyway.

I was thinking, whether this could be part of this ViolationSuppressor interface? Something like getAllSuppressionMarkers() for a file. So that this functionality needs to be provided as part of the language implementation. We would then somehow figure out afterwards, which of the markers have been used...

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions