From efee9b6ce05a7719468b23816a1f0d91d54966eb Mon Sep 17 00:00:00 2001 From: Tom Willemse Date: Sun, 16 Mar 2014 13:52:41 +0100 Subject: Add a little documentation --- commit-check | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/commit-check b/commit-check index c9a4b93..c788036 100755 --- a/commit-check +++ b/commit-check @@ -16,6 +16,49 @@ # You should have received a copy of the GNU General Public License # along with commit-ccheck. If not, see . +=head1 Commit check + +This is a simple commit style checker. It is made to be used as a git +C hook. It expects the name of the file to check as the +first command-line argument. The style that's checked is based on +tpope's L. + +Currently there are 4 style errors that are checked for. + +=over + +=item 1 + +The first character of the first line of the commit message should be +capitalized. + +=item 2 + +The first line of the commit message should be no longer than 50 +characters. + +=item 3 + +The second line of the commit message should be empty. + +=item 4 + +No line should be longer than 72 characters. + +=back + +All comments are skipped and so is all whitespace at the beginning of +the file. + +If any of the error conditions are encountered the program will exit +with a non-C<0> status. This has the effect of stopping git from +committing the message when this program is used as a C +hook. Each error condition encountered also prints a message to the +standard error stream. + +=cut + use strict; use warnings; -- cgit v1.2.3-54-g00ecf