first, thanks for PyDev, which is really a nice tool.
I have some questions regarding PyDev:
1. How can I ignore multiple warnings on one line? I tried e.g. with "#IGNORE:W0401,W0614" or "#IGNORE:W0401 IGNORE:W0614" but it would not work.
2. I have "Build Automatically" switched off. When I want to rerun PyLint, I press "Ctrl+S" to save the document, then "Ctrl+B". Often, when I do this, PyLint will not be started. I then switch to another document, then switch to the original document again, change some minor thing and press again "Ctrl+S/Ctrl+B". In most cases, PyLint will then be run. Is this a known problem?
3. Can I exclude a file from PyLint? I once accidentially run PyLint on an "__init__.py" file and now my "Problems" list view is filled with lots of (bogus) warnings within this file. Can I remove these warnings somehow?
Thanks for any pointers!
I can partially answer your third question: To instruct pyLint to ignore a specific file, you use the --ignore=filename.py option passed to pyLint. An easy way to specify pylint options is provided in eclipse: Window->Preferences Pydev+Pylint then at the bottom there is an "Arguments to pass to pylint" text box for your --ignore options. This is only a partial answer, because this will keep pylint from processing the specified files in the future, however, I do not know how to get rid of the existing warnings/errors that are displayed in the "Problems" view...
I have experienced your problem #2 as well and would love to hear more info on the topic. Where can we learn more about how eclipe and pylint are integrated?
Number 3 is a PyLint bug. Details at https://sourceforge.net/tracker/?func=detail&atid=577329&aid=1957009&group_id=85796 (there's a proposed patch to fix it in the bug comments)
I think number 2 should actually have a different implementation... maybe something that would force PyLint to be ran only on request (such as a shortcut) may be a better solution in your case (aside from that, please enter a bug report with it so that I can take a look at it).
Number 1 is also not done... It should be easy to implement (if you're willing to download the pydev source -- there are some instructions at http://pydev.sourceforge.net/developers.html ) it'd be a matter of changing line 303 of org.python.pydev.builder.pylint.PyLintVisitor to consider multiple tokens in the ignore (if you do so, please provide a patch for it... if you don't please report it as a feature request).
About 1: I didn't know about this PyDev feature to disable PyLint warnings.
What I'm using is the disable-message feature provided by PyLint itself. It supports multiple message types and also works if PyLint is executed standalone.
The syntax is:
# pylint: disable-msg=C0103,W0704,W0122
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.