Home Download Buy Blog Forum Support

Sublimelinter and pylint

Sublimelinter and pylint

Postby Mr-Homer on Thu Jan 16, 2014 7:38 pm

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.
Mr-Homer
 
Posts: 8
Joined: Tue Jun 04, 2013 8:12 pm

Re: Sublimelinter and pylint

Postby Mr-Homer on Thu Jan 16, 2014 7:45 pm

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
Mr-Homer
 
Posts: 8
Joined: Tue Jun 04, 2013 8:12 pm

Re: Sublimelinter and pylint

Postby Mr-Homer on Fri Jan 17, 2014 3:34 pm

So I dug into the linter.py source and replaced:
Code: Select all
    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

Code: Select all
    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
Mr-Homer
 
Posts: 8
Joined: Tue Jun 04, 2013 8:12 pm

Re: Sublimelinter and pylint

Postby aparajita on Mon Jan 20, 2014 8:10 am

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

https://groups.google.com/forum/#!forum/sublimelinter
aparajita
 
Posts: 173
Joined: Sun Jul 24, 2011 10:42 pm


Return to Technical Support

Who is online

Users browsing this forum: Google [Bot] and 9 guests