I saw I can change it per Eclipse instance using this solution. I would like to set it per project. Is it possible?
相关问题
- how to define constructor for Python's new Nam
- streaming md5sum of contents of a large remote tar
- How to get the background from multiple images by
- Evil ctypes hack in python
- Correctly parse PDF paragraphs with Python
Simply put a configuration file named pylintrc (with no '.') in the root directory of each project. Pylint is run with the project directory as the current working directory, and this is the first place that pylint looks for a configuration file.
The PyDev documentation suggests naming the file .pylintrc, but this is less robust because ./.pylintrc is almost last in the order of places that pylint will search. The PyDev documentation further says that this only works for PyDev 2.8.0 and above, but I am using PyDev 2.6.0 and it works for me.
The search order for the configuration file in the other answer is not quite right. I just submitted an enhancement to the Pylint documentation that describes the configuration file search order correctly:
Note that the configuration file only applies to Python files that are in modules. Thus, Pylint still uses its default rules when analyzing Python files in a directory with no
__init__.py
file. Perhaps it is this problem that is fixed in PyDev 2.8.0.For example, I have a
bin/
directory containing command line applications. Ordinarily, this directory needs no__init__.py
file because it is never imported. I had to add abin/__init__.py
file to get Pylint to analyze these Python files using mypylintrc
file.This is not Eclipse specific, but it may help anyway. According to pylint command line options:
Points 1 or 3 above may help.