Hello all,
I am trying to set pylint as a pre-commit hook for git.
The only point left is interpreting the return value of a call to pylint
(i.e deciding whether to accept or not the commit).
The value I get is 6912, with a binary value of '0b1101100000000', which
doesn't AND well to the expected value (0,1,2, etc).
I know there is a fatal error in this file tested, but I am puzzled,
this doesn't seem to fit the doc.
Any idea why I get this strange result, or did I misundertand something ?
Here is what I do in my pre-commit file :
----
#! /usr/bin/python
import sys
import os
def main(args):
files = os.popen('git show --name-only --pretty="format:"').readlines()
files = map(lambda f : f.replace("\n",""), files)
files = filter(lambda f : f and f.endswith("py"), files)
*out = os.system('pylint %s ' %files[0])*
return out
sys.exit(main(sys.argv[1:]))
----
L.
_______________________________________________
Python-Projects mailing list
Python-Projects@lists.logilab.org
http://lists.logilab.org/mailman/listinfo/python-projects