Pregunta

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.

¿Fue útil?

Solución

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).

Otros consejos

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.

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.

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.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top