Improve error messages

This commit is contained in:
Tom Willemse 2014-04-12 14:37:27 +02:00
parent 135c366f62
commit 0a570ca831

View file

@ -124,13 +124,13 @@ while (<$commitfile>) {
$lineno++; # Start at 1, so increment first
if ($lineno == 1) {
err "Not capitalized" if /^[^[:upper:]]/;
err "Longer than 50 characters" if /^.{51,}/;
err "First line is not capitalized" if /^[^[:upper:]]/;
err "First line is longer than 50 characters" if /^.{51,}/;
next;
}
err "Should be empty" if $lineno == 2 && /.+/;
err "Longer than 72 characters" if /^.{73,}/;
err "Second line should be empty" if $lineno == 2 && /.+/;
err "Line is longer than 72 characters" if /^.{73,}/;
}
close $commitfile;