简体   繁体   English

在Syntastic for Vim中仅对Python文件启用pylint

[英]Enable only pylint for Python files in Syntastic for Vim

I want to use "pylint" for checking my Python code in Vim. 我想使用“ pylint”在Vim中检查我的Python代码。 To do this, I install the Syntastic plugin, along with the "pylint" package for Ubuntu. 为此,我安装了Syntastic插件以及适用于Ubuntu的“ pylint”软件包。 Then I specify the checker I want to use by writing the following in my .vimrc. 然后,通过在.vimrc中编写以下代码来指定要使用的检查器。

let g:syntastic_py_checkers = ['pylint']

But if I write :SyntasticInfo I see that two checkers are active, "python" and "pylint", I only want pylint. 但是,如果我写了:SyntasticInfo,我看到两个检查器处于活动状态,即“ python”和“ pylint”,我只想要pylint。 So I try to disable the checkers for .py files all together. 因此,我尝试一起禁用所有.py文件的检查器。

let g:syntastic_py_checkers = []

But :SyntasticInfo still says I have two checkers active. 但是:SyntasticInfo仍然说我有两个活动的检查器。

How do I ensure that only the pylint checker is being used? 如何确保仅使用pylint检查器?

Try syntastic_python_checkers instead of syntastic_py_checkers : 尝试syntastic_python_checkers而不是syntastic_py_checkers

let g:syntastic_python_checkers = []

or 要么

let g:syntastic_python_checkers = ['pylint']

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM