diff options
author | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2016-06-28 10:12:12 +0200 |
---|---|---|
committer | Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com> | 2016-06-28 12:59:57 +0000 |
commit | 40bdbd1ab3f93e9836447eabadb41fc736663cb2 (patch) | |
tree | b75426543be80e81c412451eee361fd6fa7e6f10 | |
parent | f4821540b5a9aa53717d9d20f6cc0da545b59675 (diff) |
Teach sanity bot to look for subject lines ending with a period
Trailing punctuation is unnecessary in subject lines. It's a title,
and titles do not end with periods. Also, it leaves one more char
to use for subject content without breaking line length.
http://chris.beams.io/posts/git-commit/
Change-Id: I63199b25373ae428e6417ab7d5e90470ce3dd42b
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
-rwxr-xr-x | git-hooks/sanitize-commit | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/git-hooks/sanitize-commit b/git-hooks/sanitize-commit index 2202feb..c8adc56 100755 --- a/git-hooks/sanitize-commit +++ b/git-hooks/sanitize-commit @@ -322,6 +322,9 @@ while (<MSG>) { if (/\bQT[A-Z]+-\d+\b/) { complain_cln("Bug reference in summary", "log"); } + if (/\.$/) { + complain_cln("Summary ends with period", "log"); + } if (!$badlog && length($_) < 7) { complain_cln("Summary is too short", "log"); } elsif (!$badlog && !$revert1 && length($_) > 120) { |