summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Smith <daniel.smith@qt.io>2023-06-20 10:31:14 +0200
committerDaniel Smith <Daniel.Smith@qt.io>2023-06-20 13:26:13 +0000
commitea67c51fc06fd77e2a133ecffa54cede1bd78c8c (patch)
treedf253b7ca63a17a2e8bdb1588ce2346d91cb15a1
parentba21c3876b53b0780716e91ead53a27fd7e85477 (diff)
Verify the presence of a space following a colon in footers
Fixes: QTQAINFRA-5638 Change-Id: I2c224da115952004458ad2180c52ea0e3ed50ed6 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de> Reviewed-by: Jukka Jokiniva <jukka.jokiniva@qt.io>
-rwxr-xr-xgit-hooks/sanitize-commit5
1 files changed, 4 insertions, 1 deletions
diff --git a/git-hooks/sanitize-commit b/git-hooks/sanitize-commit
index 1e32529..715956d 100755
--- a/git-hooks/sanitize-commit
+++ b/git-hooks/sanitize-commit
@@ -492,7 +492,10 @@ while (<MSG>) {
# cherry-pick lines count as footers as well.
$ftr = 1;
$inchangelog = 0;
- } elsif (/^(?:[A-Z][A-Za-z]+(?:-[A-Za-z][a-z]+)+|F[Ii][Xx][Ee][Ss]|C[Hh][Aa][Nn][Gg][Ee][Ll][Oo][Gg]): /) {
+ } elsif (/^(?:[A-Z][A-Za-z]+(?:-[A-Za-z][a-z]+)+|F[Ii][Xx][Ee][Ss]|C[Hh][Aa][Nn][Gg][Ee][Ll][Oo][Gg]):(.+)/) {
+ if ($1 !~ /^ /) {
+ complain_ln("Missing space after colon in footer", "");
+ }
$ftr = 1;
$inchangelog = 0;
if (/^Change-?Log:/i) {