Syntastic
and flake8
in vim
not ignoring errors provided in flake8
config file.
I am using flake8
for python code linting with Syntastic
in vim
. I have a flake8
config file per flake8
documentation absolute_path_to_home/.config/flake8
which ignores error E251
. Now, when I run flake8
from command line by typing
flake8 --config=absolute_path_to_home/.config/flake8 my_python_code_that_is_being_checked.py
then flake8
ignores the error E251
. However, when I run flake8
inside vim using <F7>
the error window inside vim shows E251
despite it being ignored in the flake8
config file.
To make sure that Syntastic
is calling the flake8
with right arguments I added the following to my .vimrc
let g:syntastic_python_checkers = ['flake8']
let g:syntastic_python_flake8_args='--config=absolute_path_to_home/.config/flake8'
let g:syntastic_debug = 1
I checked the Syntastic
call inside vim
using :messages
and get the following info
syntastic: 4.483755: CacheErrors: Invoking checker: python/flake8
syntastic: 4.484046: SyntasticMake: called with options: {'errorformat': '%E%f:%l: could not compile,%-Z%p^,%A%f:%l:%c: %m,%A%f:%l: %m,%-G%.%#',
'makeprg':'flake8 --config=absolute_path_to_home/.config/flake8 my_python_code_that_is_being_checked.py', 'env': {'TERM': 'dumb'}}
syntastic: 4.615727: system: command run in 0.131497s
syntastic: 4.617432: getLocList: checker python/flake8 returned 1
syntastic: 4.618452: getLocList: checker python/flake8 run in 0.134634s
So if the message above is to be believed then Syntastic
is indeed calling flake8
with the right config file so I am not sure why E251
is still being displayed. For good measures below is what my absolute_path_to_home/.config/flake8
file
[flake8]
ignore = E251
Is this a known bug? What am I doing wrong? Will appreciate any help. Thank you.