aboutsummaryrefslogtreecommitdiffstats
path: root/contrib
diff options
context:
space:
mode:
authorBence Ferdinandy <bence@ferdinandy.com>2024-01-17 14:02:18 +0100
committerRobin Jarry <robin@jarry.cc>2024-01-18 22:07:21 +0100
commitcefdce3f82b8a477a74f573b86df8c7f2c1017a8 (patch)
treed0ee7bee9a3e1f08615305d9a6a88fb84e48bf9c /contrib
parent51ec0159ec8c51e6bcba9a420de776f4738f02eb (diff)
downloadaerc-cefdce3f82b8a477a74f573b86df8c7f2c1017a8.tar.gz
check-patches: enforce prose on changelog entries
Check if the Changelog-*: trailers have proper English sentences starting with a capital letter and ending in a period. Update CONTRIBUTING with an explicit mention of this. Signed-off-by: Bence Ferdinandy <bence@ferdinandy.com> Reviewed-by: Moritz Poldrack <moritz@poldrack.dev> Acked-by: Robin Jarry <robin@jarry.cc>
Diffstat (limited to 'contrib')
-rwxr-xr-xcontrib/check-patches6
1 files changed, 6 insertions, 0 deletions
diff --git a/contrib/check-patches b/contrib/check-patches
index 450eabae..cea65a1f 100755
--- a/contrib/check-patches
+++ b/contrib/check-patches
@@ -39,6 +39,12 @@ for rev in $revisions; do
err "'Signed-off-by: $author' trailer is missing"
fi
+ if git log --format="%(trailers:only,unfold)" -1 "$rev" | \
+ grep -v '^Changelog-[a-z]\+: [A-Z`\*_].\+\.$' | \
+ grep -q '^Changelog-[a-z]\+: '; then
+ err "Changelog-* trailers should start with a capital letter and end with a period"
+ fi
+
body=$(git log --format='%b' -1 "$rev")
body=${body%$(git log --format='%(trailers)' -1 "$rev")}
if [ "$(echo "$body" | wc -w)" -lt 3 ]; then