pylint in Vim

I’m a big fan of Vim and I do lots of Python programming and I like to ensure my code passes static analysis (using pylint).  To hook these together I added the following to my .vimrc file.

autocmd FileType python set makeprg=pylint\ --reports=n\ --msg-template=\"{path}:{line}:\ {msg_id}\ {symbol},\ {obj}\ {msg}\"\ %:p
autocmd FileType python set errorformat=%f:%l:\ %m

When you have a python file open :make runs pylint and shows the results in the quickfix window so you can jump to the line with the problem.

Vim pylint integration

  1 Comment

  1. Joseph Reddington   •  

    Thank you – just what I was looking for, now in my vimrc 🙂

Leave a Reply

Your email address will not be published. Required fields are marked *