2

My project directory is something like

src
    ProjectName
        Package1
            __init__.py
            Module1.py
            Module2.py
        Package2
            __init__.py
            Module3.py
            Moduel4.py
        __init__.py
        main.py
        setup.py

When I do Project->Clean..., PyLint runs, but only on the three files in the uppermost package: __init__.py, main.py, and setup.py.

I have gone into Project->Properties->PyDev - PYTHONPATH, and all of the source folders are definitely listed there, so I'm not sure why most of them aren't being analysed.

Also, like this question, PyDev doesn't seem to be parsing the PyLint output, as the errors and warnings that show up in the console aren't in the 'Problems' output tab, or in the editor margins. This makes me think it might be a version/regression problem, as it was for that question. I might try an older version of PyLint and see if that works.

I'm using Eclipse Helios, PyDev 2.2.1, PyLint 0.25.1, and Python 2.7.

Community
  • 1
  • 1
Cam Jackson
  • 11,860
  • 8
  • 45
  • 78

4 Answers4

3

The PyLint configuration (window > preferences > pydev > pylint), has a 'maximum number of processes for PyLint', so, it'll only run analysis on 'n' files simultaneously (because spawning too many processes at once could bring your machine to a halt).

So, you can raise that number for the analysis and and it should analyze more files at once (I'd recommend raising it for that analysis and then reducing the number again, as you don't usually want too many processes running at once).

As for the output, it could be that PyLint changed its format (please report that as a bug in the pydev sourceforge tracker if you believe that's the case).

Fabio Zadrozny
  • 24,814
  • 4
  • 66
  • 78
  • Increasing the number of processes fixed the files problem. The PyLint website is down for maintenance at the moment, so I'll have to try downgrading once it's back up. – Cam Jackson Jan 30 '12 at 00:01
  • Turns out I didn't need to downgrade PyLint, I needed to update PyDev. I had Eclipse's update detection turned off, so I didn't realise there was a new version out. No problems with PyDev 2.3 and PyLint 0.25.1. – Cam Jackson Jan 30 '12 at 23:02
2

This could be caused by recent changes in Pylint's output format which now prints column offset. You should contact the pydev maintainers reporting this.

gurney alex
  • 13,247
  • 4
  • 43
  • 57
1

I just discovered that if the file you are trying to lint is not a valid python module name, then pylint will (silently) not run on it. For example if you have an executable python script named do-thing, in your projects bin directory, it will simply not be linted. Rename the file dothing and suddenly it will work (no .py) extension is needed.

Tom Dalton
  • 6,122
  • 24
  • 35
1

I have gone into Project->Properties->PyDev - PYTHONPATH, and all of the source folders are definitely listed there.

If you mean you have there subfolders from your project (Package1 and Package2) then it's not necessary. You should have only your project's main folder there.

I use PyDev 2.3.0 and when cleaning a project all project's files are being processed by Pylint. Problem with parsing Pylint's output was fixed in PyDev 2.2.2 See my answer here.

Community
  • 1
  • 1
Piotr Dobrogost
  • 41,292
  • 40
  • 236
  • 366