diff options
author | Daniel Smith <daniel.smith@qt.io> | 2024-03-20 14:19:31 +0100 |
---|---|---|
committer | Daniel Smith <daniel.smith@qt.io> | 2024-03-25 11:04:19 +0000 |
commit | 141876182b9431a7f847f877188bd5e1c0407dea (patch) | |
tree | a3f1da3da8d09462c0af489b4ed174c5f20aa842 /git-hooks | |
parent | 4296b4da75575fb4409b72e5c35c5727e44594ce (diff) |
Verify that the form of [Third-Party Code] is correct in the ChangeLog.
amends d18cc13199ecb8ad833f759006fdf68b7703878c.
Task-number: QTQAINFRA-6097
Change-Id: If4f75a0beb0e19bc5441043fad95c536153dece2
Reviewed-by: Daniel Smith <daniel.smith@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Diffstat (limited to 'git-hooks')
-rwxr-xr-x | git-hooks/sanitize-commit | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/git-hooks/sanitize-commit b/git-hooks/sanitize-commit index b01300b..b405b1c 100755 --- a/git-hooks/sanitize-commit +++ b/git-hooks/sanitize-commit @@ -548,8 +548,12 @@ while (<MSG>) { $inchangelog = 1; if (!/^\[ChangeLog\]/ && !defined($cfg{changelog})) { complain_ln("Bad form of [ChangeLog] tag", "changelog"); - } elsif (/\[ChangeLog\]\[Third-Party Code\]/) { - $changelog3rdparty = 1; + } + if (/\[(?:third|3rd)[ _-]*party[ _-]*code\]/i) { + $changelog3rdparty = $lineno; + if (!/\[Third-Party Code\]/) { + complain_ln("Bad form of [Third-Party Code] tag", "changelog"); + } } } elsif (/^\[[A-Z][- \w]+\]/) { complain_ln("Likely change-log entry without [ChangeLog] tag", "", -1); @@ -1094,7 +1098,10 @@ printerr; flushFile(); if ($changelog3rdparty && !$attribution_changed) { - complain("[ChangeLog][Third-Party Code] entry without change to qt_attribution.json", "changelog"); + $file = "!!!!!"; + do_complain($changelog3rdparty, + "[ChangeLog][Third-Party Code] entry without change to qt_attribution.json", + "changelog"); } if ($mixws_check) { |