Closed MichaelChirico closed 3 weeks ago
I think we had a similar idea for linting blanket nolints.
A more common mistake appears to be # nolint: seq_linter
, with the same effect due to the missing terminal .
.
The difficulty is we'd need an exception for exclude()
for such lints.
I think you're right that #690 is about as good as we can hope to do here. I'll close in favor of that.
Came across someone using
today. Of course that's to exclude the lint, but that's only because it's being read as a blanket
#nolint
, i.e. it matches# nolint
_but not# nolint:
so it is just doing a global exclusion.It only matters for cases where other lints are also being hidden (or might be in the future).
Is there any way we can detect this & warn the user? I didn't think of anything quickly besides hacky approaches.