summaryrefslogtreecommitdiff
path: root/Meta/lint-commit.sh
diff options
context:
space:
mode:
authorIdan Horowitz <idan.horowitz@gmail.com>2022-01-11 23:31:08 +0200
committerIdan Horowitz <idan.horowitz@gmail.com>2022-01-11 23:45:14 +0200
commita8537ad0964f2490c658f484fcec6c9d2f257d7b (patch)
tree0115084177c9e6f1c17d66be097932bc8c45e7ba /Meta/lint-commit.sh
parent14f6856d1dfaa2e8d36c42f4f1daead5dd52f63e (diff)
downloadserenity-a8537ad0964f2490c658f484fcec6c9d2f257d7b.zip
CI: Require a blank line between commit titles and bodies
Diffstat (limited to 'Meta/lint-commit.sh')
-rwxr-xr-xMeta/lint-commit.sh4
1 files changed, 4 insertions, 0 deletions
diff --git a/Meta/lint-commit.sh b/Meta/lint-commit.sh
index 293220da7a..d6e0887403 100755
--- a/Meta/lint-commit.sh
+++ b/Meta/lint-commit.sh
@@ -30,6 +30,10 @@ while read -r line; do
((line_number += 1))
line_length=${#line}
+ if [[ $line_number -eq 2 ]] && [[ $line_length -ne 0 ]]; then
+ error "Empty line between commit title and body is missing"
+ fi
+
category_pattern="^\S.*?\S: .+"
if [[ $line_number -eq 1 ]] && (echo "$line" | grep -E -v -q "$category_pattern"); then
error "Missing category in commit title (if this is a fix up of a previous commit, it should be squashed)"