Skip to content

Extend SuperfluousDisableCommandRule to undefined rules #2348

Closed
@fredpi

Description

Currently, if I have a SwiftLint disable statement somewhere in my code, yet there isn't any rule triggering a violation, I get a warning about the superfluous statement (SuperfluousDisableCommandRule). I suggest to extend this behaviour to rules that aren't event defined, so if I'd write swiftlint:disable some_fancy_word, I would also get an error, even if some_fancy_word isn't a rule at all.

This would be helpful when dropping custom rules that once required for a few disable statements in-code. Currently, disable statements covering abandoned rules will rest in the code like dinosaurs 🦕.

Metadata

Assignees

No one assigned

    Labels

    enhancementIdeas for improvements of existing features and rules.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions