windows下如何为pylint指定配置文件? [英] How to specify a configuration file for pylint under windows?
问题描述
我正在将 pylint 评估为源代码检查器,并且我想自定义一行中的最大字符数.
I am evaluating pylint as source code checker and I would like to customize the maximum number of characters on a single line.
我想使用配置文件.多亏了 --generate-rcfile 命令,我生成了一个模板,并进行了修改.
I would like to use a configuration file. I've generated a template thanks to the --generate-rcfile command and I've made my modification.
我正在尝试运行 pylint --rcfile=myfile.rc 但我可以看到 pylint 没有考虑我的更改.我在我的用户文件夹中为我的文件尝试了不同的位置:\Python26\Scripts\ 和 pylint.d,但没有成功.
I am trying to run pylint --rcfile=myfile.rc but I can see that my changes are not taken into account by pylint. I've tried different location for my file : \Python26\Scripts\ and pylint.d in my user folder without any success.
有人知道我做错了什么吗?
Does anybody know what I am doing wrong?
是否可以将配置文件与 pylint-gui 一起使用?我也做不到吗?
Is it possible to use the configration file with pylint-gui? I can't do it too?
推荐答案
在 Windows 7 上,您的主目录(通常为 C:\Users\myusername)中的 .pylintrc 文件将被自动识别.
On Windows 7, a .pylintrc file in your home directory (typically C:\Users\myusername) will be automatically recognized.
您可以使用以下方法创建模板:
You can create a template using:
pylint --generate-rcfile > .pylintrc
这篇关于windows下如何为pylint指定配置文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!