I use flake8 as python linter in vscode. I want flake8 to ignore all warning, but I can't find any option to detect error-only after searching flake8 documentation. So, how can I achieve this? Any help?
though flake8 has things that are marked "E" and "F" and "W" they don't stand for "error" / "failure" / "warning". these are codes for particular plugins ("E" / "W" are pycodestyle, "F" is pyflakes)
if you want to exclude a particular set of warnings, you'd use the --extend-ignore=X argument (or the --ignore=X argument, though the former is preferable since it doesn't reset the default set of ignores).
It's usually easier to set this in a flake8 configuration file (tox.ini / setup.cfg / .flake8) such that others can take advantage of this setting without needing to use your IDE-specific setting.
[flake8]
extend-ignore = X, Y, Z
If you know you only want a particular set of codes, you can also utilize --select
[flake8]
select = F,E
disclaimer: I am the current maintainer of flake8
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With