Python lint tool (was: Re: [Python-Dev] Python keywords (was
Lockstep iteration - eureka!))
Ka-Ping Yee
ping@lfw.org
Mon, 14 Aug 2000 13:58:11 -0500 (CDT)
Trent Mick wrote:
Oh yeah? What does the linter check? I would be interested in seeing that.
James C. Ahlstrom wrote:
> Actually I have better luck parsing Python than linting it. [...]
> All I can really do so far is get and check function signatures.
Python is hard to lint-check because types and objects are so
dynamic. Last time i remember visiting this issue, Tim Peters
came up with a lint program that was based on warning you if
you used a particular spelling of an identifier only once (thus
likely to indicate a typing mistake).
I enhanced this a bit to follow imports and the result is at
http://www.lfw.org/python/
(look for "pylint").
The rule is pretty simplistic, but i've tweaked it a bit and it
has actually worked pretty well for me.
Anyway, feel free to give it a whirl.
-- ?!ng