11

I have pylint installed (works fine on the command line) and set up within Pydev in Eclipse.

Pylint is being triggered OK when I edit files, and is outputting to the Eclipse console.

But, the pylint warnings don't appear as marks in the editor margin (in the same way as compiler warnings and errors)

Newly-generated warnings don't appear in the Problems view either - there are some old ones showing, but they disappear if I re-save the relevant module.

I know this is possible as I've had it working previously - but how do I set this up?

Ticking or unticking "Redirect Pylint output to console?" doesn't seem to make any difference.

DNA
  • 42,007
  • 12
  • 107
  • 146
  • For future readers, [this bug was fixed](http://sourceforge.net/tracker/index.php?func=detail&aid=3376410&group_id=85796&atid=577329) as of PyDev 2.2.2. In addition, Pydev 2.3 works quite happily with PyLint 0.25.1. – Cam Jackson Jan 30 '12 at 23:09

5 Answers5

3

I had this exact problem today, on a brand new system. I tracked down the cause, and it seems that PyDev refuses to pick up the messages from pylint 0.24.0, which was released on July 20, 2011.

Reverting to the previous version (pylint 0.23.0) seems to have solved the problem. For me, that involved removing everything from Python's Lib/site-packages directory that was related to pylint, and then running python setup.py install from the directory I'd extracted pylint 0.23.0 into. (Without deleting those files in the site-packages directory first, it kept using the new version.) But after both those steps, the messages started showing up in PyDev as expected.

You can check your pylint version with pylint --version from a shell prompt; if it shows 0.23.0 you're good to go.

JohnSpeeks
  • 735
  • 6
  • 14
  • 1
    Thanks, will give that a try - it was a recent install so this could well be the problem... – DNA Sep 16 '11 at 20:36
  • See my comment above, at the time this answer was posted, this bug [already had a fix](http://sourceforge.net/tracker/index.php?func=detail&aid=3376410&group_id=85796&atid=577329), but I'm not sure if it had made it to stable release, as I can't find a release date for PyDev 2.2.2. Either way, it's definitely resolved now. – Cam Jackson Jan 30 '12 at 23:11
2

I was having the same problem, and it turned out to be my pylint configuration file (~/.pylintrc by default). Be sure the output-format field is correct. It is under the [REPORTS] section, and the line should be:

output-format=text

If you've ever used pylint with another application (I do with emacs), it might say output-format=parseable.

falcojr
  • 1,299
  • 1
  • 10
  • 18
  • Thanks. I don't have a pylintrc (Pylint: The stderr of the command line is: No config file found, using default configuration). So it should be running with output-format=text (pylint --help says: Set the output format. Available formats are text, parseable, colorized, msvs (visual studio) and html [current: text]) – DNA Sep 09 '11 at 15:20
  • This was the cause of the problem in my case. – nikow Jun 27 '13 at 14:11
  • I also had to set include-ids=yes – Whatang May 05 '14 at 19:00
2

Ticket for this bug is titled java.lang.NumberFormatException with PyLint 0.24.0 and the bug was fixed in PyDev 2.2.2

Piotr Dobrogost
  • 41,292
  • 40
  • 236
  • 366
0

have you tried rebuilding your project?

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

Only modules reachable through PYTHONPATH are passed to pylint, so you need to set your PYTHONPATH correctly in the project options.

Remy Blank
  • 4,236
  • 2
  • 23
  • 24
  • I have most (perhaps not 100%) of my modules on the PYTHONPATH, so I'd expect to see some results. I am certainly getting results in the console - just not in the editor. – DNA Aug 15 '11 at 18:45