First off, great job with pydev, I do a lot of python development at work and I find Eclipse/Pydev a lot nicer than just using vim ;-)
Anyway, within each (most) of our package directories we have a test directory. This contains unit tests for the modules in the package and is non-deliverable code, from the point of view of our customers. As such, it's exempt from our internal coding standards though obviously it's still readable/maintainable. As such, the unit tests generate *masses* of pylint errors, warnings etc, which tend to swamp the genuine errors coming from the 'real' code. Is there any way to get pydev to run pylint selectively? Because of the way pydev invokes pylint for modules, it seems we cannot use the --ignore=XXX options to pydev itself.
All we really need is to be able to say 'if the module to be linted is in a package called 'test' then don't lint it. Is there any way to do this currently, or is it planned?
Thanks in advance,
Tom Dalton
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Yeap, currently there's no such option for PyLint within Pydev.
You can report it as a feature request -- (maybe a behavior similar to pydev extensions, where you can add #@PydevCodeAnalysisIgnore in your file to prevent it from being analyzed) -- would be a nice option.
It would be an option doing it yourself and submitting it as a patch too (as it should be a pretty easy fix in the way I described above -- tweaking org.python.pydev.builder.pylint.PyLintVisitor.java a bit should do the trick...)
Cheers,
Fabio
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Gents,
First off, great job with pydev, I do a lot of python development at work and I find Eclipse/Pydev a lot nicer than just using vim ;-)
Anyway, within each (most) of our package directories we have a test directory. This contains unit tests for the modules in the package and is non-deliverable code, from the point of view of our customers. As such, it's exempt from our internal coding standards though obviously it's still readable/maintainable. As such, the unit tests generate *masses* of pylint errors, warnings etc, which tend to swamp the genuine errors coming from the 'real' code. Is there any way to get pydev to run pylint selectively? Because of the way pydev invokes pylint for modules, it seems we cannot use the --ignore=XXX options to pydev itself.
All we really need is to be able to say 'if the module to be linted is in a package called 'test' then don't lint it. Is there any way to do this currently, or is it planned?
Thanks in advance,
Tom Dalton
So I guess that this is both unsupported and unplanned? It's a shame that I can't even use the pylint options to control this behaviour...
Yeap, currently there's no such option for PyLint within Pydev.
You can report it as a feature request -- (maybe a behavior similar to pydev extensions, where you can add #@PydevCodeAnalysisIgnore in your file to prevent it from being analyzed) -- would be a nice option.
It would be an option doing it yourself and submitting it as a patch too (as it should be a pretty easy fix in the way I described above -- tweaking org.python.pydev.builder.pylint.PyLintVisitor.java a bit should do the trick...)
Cheers,
Fabio