Closed asottile closed 3 years ago
In GitLab by @asottile on Jan 30, 2019, 08:36
Seems like a good idea, would happily take a patch for this feature.
There's a related issue as well that I've been meaning to work on: #352
In GitLab by @qxv0 on Jan 31, 2019, 24:41
changed title from Issue an error when there are unsed --per-file-ignores rules to Issue an error when there are un{+u+}sed --per-file-ignores rules
In GitLab by @asottile on Mar 24, 2020, 09:50
so unfortunately, due to the differences between the plugin I'm not sure this is possible. in the plugin, the per-file-ignores were filenames, but in flake8 they are filename patterns
this subtlety means that from a given invocation we can't know whether the rule applies or not
consider this example:
per-file-ignores =
tests/*: E501
if we invoke flake8 tests/test1.py
and it doesn't have E501 it shouldn't be an unused rule, but we would need to be able to find all things matching that glob to know if it's unused or not
In GitLab by @sigmavirus24 on Apr 9, 2020, 05:44
I agree @asottile. I think we can safely close this for now. There hasn't been much support of this since it was opened
In GitLab by @sigmavirus24 on Apr 9, 2020, 05:44
closed
In GitLab by @qxv0 on Jan 30, 2019, 06:44
Please provide the exact, unmodified output of
flake8 --bug-report
Please describe the problem or feature We have been using flake8-per-file-ignores plugin. With the recent release of flake8 provides a build-in
--per-file-ignores
option. But unlike the plugin the now built-in option won't complain if any of the ignored errors are not used anymore.It's a useful feature because: