On Wed, Sep 26, 2012 at 3:00 PM, Stanislav Ochotnicky <
sochotnicky(a)redhat.com> wrote:
Alec and me have been talking about automatic usage of pylint/pep8 in
git
hooks.
There are 2 approaches basically:
1. let people read README or some other document and install the hook
manually
2. automatically install in one way or the other
Because I know people don't read and will forget, we'll check out the repo
on
different machine etc. So I've taken the 2nd approach in try-commit-hooks
branch (last commit)[1]
What it does is simple
"ln -s '../../git-hooks/pre-commit' .git/hooks/pre-commit".
Possible issue: I run it in try-fedora-review because I know we won't
forget to
run it after checking out new repo. This means automatic installation of
hook on
systems which don't have any pre-commit hook yet. But since we are running
it at
a point when someone actually tries to execute our code I don't think it's
a big
issue (wrt security).
Any opinions either way?
For the record we now have really nice pylint/pep8 clean repository but
problematic commits are appearing because...well me mostly right now :-)
[1]
http://git.fedorahosted.org/cgit/FedoraReview.git/commit/?h=try-commit-ho...
--
Stanislav Ochotnicky <sochotnicky(a)redhat.com>
Software Engineer - Base Operating Systems Brno
PGP: 7B087241
Red Hat Inc.
http://cz.redhat.com
_______________________________________________
fedorareview mailing list
fedorareview(a)lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/fedorareview
Sound like a great idea, if the the pylint.conf har been tuned to not
report to many strange things.
Tim