Skip to content

Linting of noqa comments #1611

@kasium

Description

@kasium

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...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions