[IronPython] Code Quality Tools
Michael Foord
michael.foord at resolversystems.com
Thu Jun 22 16:09:42 CEST 2006
Hello all,
At Resolver we are looking into tools that we can use to provide simple
code hygiene checks. Check we're not shadowing built-in names, check for
unneeded import statements and unused variables; that sort of thing.
I know of three Python modules that do this. They all fail unredeemably
on IronPython :
* PyLint
Uses the compiler.ast module extensively
* PyChecker
Does bytecode analysis
* PyFlakes
Uses compiler.parse
(See also the previous email about coverage tools not working on
IronPython because "sys.settrace" is not implemented.)
We can use PyFlakes from CPython (and possbily PyLint- but not PyChecker
because it executes code), but that means our test code is dependent on
CPython.
So there are no native code quality tools that will work with
IronPython. This could be a barrier to entry for some projects who
consider using IronPython.
I realise it is not going to be high up the priority list, but if a
solution to this was possible it would be good.
One possibility is a pure Python ports of the parser module (which
should get the compiler and compiler.ast modules working). There is a
tool called EasyExtend which can generate CSTs in Pure Python, so it
could be possible to convert one of the existing tools to use this.
All the best,
Michael Foord
http://www.resolversystems.com
http://www.voidspace.org.uk/python/index.shtml
More information about the Ironpython-users
mailing list