问题描述
我使用了很多不遵循pep8的代码(我无法修复),并且希望syntastic不使用pep8语法检查器.有办法禁用它吗?
I work with enough code that does not follow pep8 (that I cannot fix) and would like syntastic to not use the pep8 syntax checker. Any way to disable it?
推荐答案
如果您将flake8用作python语法检查器,则可以这样做(将其放入 vimrc 或 ftplugin/python.vim 文件):
If your are using flake8 as a python syntax checker you could do it like this (put it into your vimrc or ftplugin/python.vim file):
let g:syntastic_python_checkers=['flake8']
let g:syntastic_python_flake8_args='--ignore=E501,E225'
您需要显式地使每个错误类静默(并且不能从整体上禁用pep8检查).请参见 flake8文档和 pycodestyle文档(以前是pep8),用于所有错误和警告代码.
You need to silence each error class explicitly (and cannot disable pep8 checking as a whole). See the flake8 documentation and pycodestyle documentation (used to be pep8) for all error and warning codes.
这篇关于禁用pep8语法检查中的python文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!