openSUSE/kiwi — pull request #10 by rjschwei (2011-11-05 17:25:32+00:00)
Title: add git pre-commit hook and clean URL module to level 5 (still needs a fi

Hi,

This implements the hook stuff I mentioned in the message to the list. Also cleans up URL and Locator. Anyway, you can play around with it to see if you like this.

It takes a little longer to run "git commit" as it takes a while for perlcritic to slug through the code being checked in. However, I think this relatively short delay is well worth it as we can catch a lot of subtle stuff with perlcritic that otherwise might manifest itself as stupid runtime bugs.

For now I have implemented the hook code such that we can clean stuff up all the way to level 1 of perlcritic. However, in the long run I think this is not necessary as perlcritic at some points starts complaining about stupid stuff.

I think this is a good start. as we get more comfortable with things and move up the later we can see what level makes sense for us. I think if we get everything to level 3 "clean" it would be great.

I do not know how to set up git such that the hook automatically gets linked/installed when someone clones the repo. The other thing that is missing is a BuildRequires: or Recommends: for perlcritic in the spec file.

Play around with this and let me know what you think.

Later,
Robert