3

As we all know sometimes it's OK to break the rules. Flycheck Mode however, isn't as forgiving and happily displays it's warning.

Is there a way to disable this on a per line basis when using flake8? For example: Adding a comment # fc:ignore on the same line as a warning you want to ignore.

  • 1
    This is usually handled by the checker executable itself. What checker are you using? – Jordon Biondo Dec 16 '15 at 7:21
4

Flycheck does not provide a generic way to ignore warnings, partly because no one implemented that feature yet, but mostly because we do not want to add yet another system to manage warnings to inline comments, configuration files, compiler flags, etc… Warning control is already complicated enough without adding our ingredients to the soup.

Instead, Flycheck relies what the corresponding syntax checker provides for warning control. For some syntax checkers that is a configuration file, for other it's flags to the compiler.

Flake8 specifically allows to inhibit warnings by adding a # noqa comment to the end of the affected line. Alternatively you can ignore specific warnings by disabling them in the configuration file of flake8.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.