Search code examples
pythonwindowscode-analysispydevpylint

Howto parse multiple files (whole packages) with pylint


I am working with python 2.7 and installed pylint 0.24, as an IDE i use Eclipse (with pydev) and the OS is windows 7 64 bit. Pylint works so far, but in eclipse i only get the pylint report when i save a python file.

So my question is, is it possible to parse multiple files at once, for example all files in a package or a project with pylint in eclipse or on command line?

Best regards
Gobliins


Solution

  • Yes it is. I'm working with Aptana but it should be the same deal. When u save a file in eclipse the first line in your console should be:

    PyLint: Executing command line:' /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pylint-0.23.0-py2.7.egg/pylint/lint.py --include-ids=y /Users/bogdan/Documents/TVB/tvb-root/tvb/trunk/tvb/core/storage/model.py
    

    All you need to do is copy this lane into the terminal and replace for example:

    /Users/bogdan/Documents/TVB/tvb-root/tvb/trunk/tvb/core/storage/model.py
    

    With:

    /Users/bogdan/Documents/TVB/tvb-root/tvb/trunk/tvb/core/storage
    

    This should run pylint on all the storage folder.