pylint integration?

72 views
Skip to first unread message

JMehring

unread,
Aug 26, 2010, 11:13:51 PM8/26/10
to pep8
Hello,

I was wondering if there was any way to easily integrate pep8 into
pylint as an add-on checker?

I use pylint in my zope/plone buildout and my IDE (wing) integrates
nicely with pylint, so I thought it would be nice to have the PEP8
messages integrated (so I don't need to run both utilities).

pylint does not seem to handle PEP8? since I get perfect code with
pylint, but PEP8 shows E201, etc.

TIA,

Jason

Reinout van Rees

unread,
Aug 28, 2010, 2:34:57 PM8/28/10
to pe...@googlegroups.com
On 08/27/2010 05:13 AM, JMehring wrote:
> Hello,
>
> I was wondering if there was any way to easily integrate pep8 into
> pylint as an add-on checker?

I don't know how pylint works internally, but pep8 basically only needs
to be fed a python file, so in that sense it should be easily integratable.

> I use pylint in my zope/plone buildout and my IDE (wing) integrates
> nicely with pylint, so I thought it would be nice to have the PEP8
> messages integrated (so I don't need to run both utilities).

I combined two tools (pep8 and pyflakes) myself by combining the output
with a script file.

http://reinout.vanrees.org/weblog/2010/05/11/pep8-pyflakes-emacs.html

A quick perl (...) command line regex replacement will add [] around
pep8's error message so that it conforms more or less to pylint's
format. At least for Hudson's pylint-expecting quality measurement to
pick up the errors:

pep8 somefile.py | perl -ple �s/: ([WE]\d+)/: [$1]/� > pep8.txt


Reinout

--
Reinout van Rees - rei...@vanrees.org - http://reinout.vanrees.org
Programmer at http://www.nelen-schuurmans.nl
"Military engineers build missiles. Civil engineers build targets"

Reply all
Reply to author
Forward
0 new messages