nvie / vim-flake8

Flake8 plugin for Vim
BSD 2-Clause "Simplified" License
1.06k stars 99 forks source link

ignore `flake8 --count` lines #93

Closed pmrowla closed 3 years ago

pmrowla commented 3 years ago

Fixes #68

If flake8 is configured to run with --count (count = True in a config file) it will print an extra line that contains the number of errors found.

If there are no errors, this causes vim-flake8 to open a quickfix window containing || 0, since the 0 line does not match any of the expected patterns. If there are any errors, this causes vim-flake8 to open a quickfix window containing an extra || <count> line at the end.

This PR just updates the expected patterns to ignore flake8 output lines that only contain a number


To reproduce the issue:

example flake8 with count output:

$ ls
setup.cfg  test.py
$ cat test.py
print("hello world")
$ cat setup.cfg
[flake8]
count = True
$ flake8 test.py
0

vim-flake8 with no errors Screen Shot 2021-07-06 at 3 47 27 PM

vim-flake8 with errors Screen Shot 2021-07-06 at 3 48 24 PM