首先使用package control安装pylinter,按住ctrl+shift+p,
在弹出框中输入package Control:install Package,
回车,进入下一步安装插件,输入框中输入pylinter
找到对应的pylinter模块安装
安装完成后修改相应配置,如图所示:
将如下代码拷贝到Settings-user配置文件中:并且修改"python_path": [“C:/Python27/python.exe”]
以及"pylint_path": "C:/Python27/Lib/site-packages/pylint/lint.py"为你自己环境对应的文件地址。
{
// When versbose is 'true', various messages will be written to the console.
// values: true or false
"verbose": false,
// The full path to the Python executable you want to
// run Pylint with or simply use 'python'.
"python_bin": "python",
// The following paths will be added Pylint's Python path
"python_path": [
"C:/Python27/python.exe"
],
// Optionally set the working directory
"working_dir": null,
// Full path to the lint.py module in the pylint package
"pylint_path": "C:/Python27/Lib/site-packages/pylint/lint.py",
// Optional full path to a Pylint configuration file
"pylint_rc": null,
// Set to true to automtically run Pylint on save
"run_on_save": true,
// Set to true to use graphical error icons
"use_icons": true,
"disable_outline": false,
// Status messages stay as long as cursor is on an error line
"message_stay": false,
// Ignore Pylint error types. Possible values:
// "R" : Refactor for a "good practice" metric violation
// "C" : Convention for coding standard violation
// "W" : Warning for stylistic problems, or minor programming issues
// "E" : Error for important programming issues (i.e. most probably bug)
// "F" : Fatal for errors which prevented further processing
"ignore": [],
// a list of strings of individual errors to disable, ex: ["C0301"]
"disable": [],
"plugins": []
}
再通过pip命令安装pylint模块,pip install pylint
如果pip未安装,可参考网上教程进行安装 https://blog.csdn.net/qq_35520506/article/details/103731366 。