diff options
author | Bence Ferdinandy <bence@ferdinandy.com> | 2024-01-17 14:02:18 +0100 |
---|---|---|
committer | Robin Jarry <robin@jarry.cc> | 2024-01-18 22:07:21 +0100 |
commit | cefdce3f82b8a477a74f573b86df8c7f2c1017a8 (patch) | |
tree | d0ee7bee9a3e1f08615305d9a6a88fb84e48bf9c /contrib/check-patches | |
parent | 51ec0159ec8c51e6bcba9a420de776f4738f02eb (diff) | |
download | aerc-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/check-patches')
-rwxr-xr-x | contrib/check-patches | 6 |
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 |