Extend SuperfluousDisableCommandRule to undefined rules #2348
Closed
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 🦕.