Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linting of noqa comments #1611

Closed
kasium opened this issue Jul 1, 2022 · 1 comment
Closed

Linting of noqa comments #1611

kasium opened this issue Jul 1, 2022 · 1 comment

Comments

@kasium
Copy link
Contributor

kasium commented Jul 1, 2022

describe the request

  1. Flake8 itself is picky about noqa comments, so e.g. noqa F123 or flake8 : noqa might not do what the users expect
  2. Also e.g. a project might want to ban the usage of flake8: noqa or bare noqa comments.

As far as I'm aware of there is flake8-noqa, which hacks into the internals of flake8 which was already discussed here: #603 (comment).

Writing a plugin which verifies correct comments (1) can be done, but (2) is not possible w/o hacks, since noqa disables all errors. Therefore my feature request: can maybe flake8 directly offer this? It's maybe similar to pylint errors suppressed-message and locally-disabled. It would be a great addition to flake8. However, this basically means, that flake8 needs to implement own checks which is maybe out of scope for a framework...

@asottile
Copy link
Member

asottile commented Jul 1, 2022

#603

@asottile asottile closed this as completed Jul 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants