Sublime Forum

Sublimelinter and pylint

#1

I am trying to get the pylint plugin to work with SublimeLinter.

I am using the Win 64 bit portable version 3061
I have Python33 installed in c:\Python33
Pylint is in c:\Python33\Scripts (i followed the instruction and used pip to install is as well as astroid and logilab)

I have read and re-read the installation instructions and I have tried everything I can think of. Can anyone help?

I have pylint installed and I can run ‘pylint’ from any directory. It’s in my system PATH (it’s also in my user PATH).

I have Sublimelinter installed and the SublimeLinter-pylint plugin installed. (I have even removed and reinstalled them).

At startup (I have debug set to true) i get:
SublimeLinter: pylint activated: (None, None)
found 14 files for base name Main.sublime-menu
SublimeLinter: ERROR: pylint cannot locate ‘pylint@python’

When I am in a python file and ctrl-shift-P->Lint (Lint This View) I get the following error in the console:
SublimeLinter: ERROR: pylint cannot locate ‘pylint@python’

For what it’s worth, SublimeLinter is working fine with cppcheck.

Thanks for any help.

0 Likes

#2

Here is the debug output from SublimeLinter. pylint is in c:\Python33\Scripts
SublimeLinter: sys.path for C:\Python33\python.exe:
C:\Python33\lib\site-packages\setuptools-2.1-py3.3.egg
C:\Python33\Scripts
C:\WINDOWS\system32\python33.zip
C:\Python33\DLLs
C:\Python33\lib
C:\Python33
C:\Python33\lib\site-packages

0 Likes

#3

So I dug into the linter.py source and replaced:

cmd = ( 'pylint@python', <-----------------------------------------------------------------------------This # '--msg-template={path}:{line}: {msg_id}({symbol}), {obj}] {msg}', # only usable if pylint is >= 1.0 # so keeping '--output-format=parseable' for now '--output-format=parseable', # easiest format to parse '--module-rgx=.*', # don't check the module name '--reports=n', # remove tables '--persistent=n', # don't save the old score (no sense for temp) )

with

cmd = ( 'pylint', <------------------------------------------------------------------------------------ With this # '--msg-template={path}:{line}: {msg_id}({symbol}), {obj}] {msg}', # only usable if pylint is >= 1.0 # so keeping '--output-format=parseable' for now '--output-format=parseable', # easiest format to parse '--module-rgx=.*', # don't check the module name '--reports=n', # remove tables '--persistent=n', # don't save the old score (no sense for temp) )

And now it seems to work.

My question is, how exactly does the @python meta setting work? I tried setting it in the project like the manual said, but that didn’t work. I also tried setting it to ‘’ and that didn’t work either.

thanks

0 Likes

#4

I don’t monitor this forum usually, you’ll have a much better chance for support at the SublimeLinter support forum.

groups.google.com/forum/#!forum/sublimelinter

0 Likes