GSoC/GCI Archive
Google Code-in 2014 FOSSASIA

Generate Git commit message validators

completed by: Iliyan Germanov

mentors: Aruna Herath

Write a bash script (generator script) that would generate a python/bash/ruby script (validator script) that could be used as a git hook to validate the commit message.

The generator script should take following as inputs.

1) Maximum number of charactors in a single line. (seperated by new lines)
2) Maximum Number of charactors in the whole commit message.
3) Minimum Number of charactors in the whole commit message.
4) A regular expression that will be matched to each sentence (seperated by dots (fullstops/periods)).
5) A regular expression that will be matched against the whole commit message.

All above tests should be optional. So the user can opt to enforce all or some of them.

The generator script will be put in the projects root folder (along with the .git folder). It should generate the validator script and place it in the appropriate location with the appropriate name.

About git hooks: http://git-scm.com/book/en/v2/Customizing-Git-Git-Hooks