summaryrefslogtreecommitdiff
path: root/Meta/lint-commit.sh
diff options
context:
space:
mode:
authorthislooksfun <tlf@thislooks.fun>2021-10-26 13:08:39 -0500
committerAndreas Kling <kling@serenityos.org>2021-11-02 12:23:30 +0100
commitc2d44209a8f508ccb243410fc0e591976820b287 (patch)
tree6500ff07de9f876a3bc4958e178636e5d5b510ad /Meta/lint-commit.sh
parent4de7b3ad24209777d40445ed4e8b6ffcee5185b6 (diff)
downloadserenity-c2d44209a8f508ccb243410fc0e591976820b287.zip
Meta: Use grep -E/F, not grep -P
grep -E and -F are POSIX standard, and meets all our matching needs.
Diffstat (limited to 'Meta/lint-commit.sh')
-rwxr-xr-xMeta/lint-commit.sh6
1 files changed, 3 insertions, 3 deletions
diff --git a/Meta/lint-commit.sh b/Meta/lint-commit.sh
index 1df284f930..b30dd9bcd0 100755
--- a/Meta/lint-commit.sh
+++ b/Meta/lint-commit.sh
@@ -29,12 +29,12 @@ while read -r line; do
line_length=${#line}
category_pattern="^\S.*?\S: .+"
- if [[ $line_number -eq 1 ]] && (echo "$line" | grep -P -v -q "$category_pattern"); then
+ 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)"
fi
title_case_pattern="^\S.*?: [A-Z0-9]"
- if [[ $line_number -eq 1 ]] && (echo "$line" | grep -P -v -q "$title_case_pattern"); then
+ if [[ $line_number -eq 1 ]] && (echo "$line" | grep -E -v -q "$title_case_pattern"); then
error "First word of commit after the subsystem is not capitalized"
fi
@@ -43,7 +43,7 @@ while read -r line; do
fi
url_pattern="([a-z]+:\/\/)?(([a-zA-Z0-9_]|-)+\.)+[a-z]{2,}(:\d+)?([a-zA-Z_0-9@:%\+.~\?&\/=]|-)+"
- if [[ $line_length -gt 72 ]] && (echo "$line" | grep -P -v -q "$url_pattern"); then
+ if [[ $line_length -gt 72 ]] && (echo "$line" | grep -E -v -q "$url_pattern"); then
error "Commit message lines are too long (maximum allowed is 72 characters)"
fi