diff options
Diffstat (limited to 'Meta/lint-commit.sh')
-rwxr-xr-x | Meta/lint-commit.sh | 6 |
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 |