Skip to content

Commit b4d6eed

Browse files
committed
fix(scripts): changed the scripts to be more permissive in length
1 parent 19fee65 commit b4d6eed

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

scripts/hooks/commit-msg

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ fi
2525

2626
description=$(printf "%s" "$header" | sed -E "s/^($TYPES)\([^)]+\):[[:space:]]*(.*)$/\2/I")
2727
len=$(printf '%s' "$description" | wc -c | tr -d '[:space:]')
28-
if [ "$len" -lt 50 ] || [ "$len" -gt 170 ]; then
29-
log_error "Description length must be between 50 and 170 characters (got $len)."
28+
if [ "$len" -lt 25 ] || [ "$len" -gt 170 ]; then
29+
log_error "Description length must be between 25 and 170 characters (got $len)."
3030
log_info "Your description: \"$description\""
3131
exit 1
3232
fi

scripts/hooks/pre-commit

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ fi
2525

2626
description=$(printf "%s" "$header" | sed -E "s/^($TYPES)\([^)]+\):[[:space:]]*(.*)$/\2/I")
2727
len=$(printf '%s' "$description" | wc -c | tr -d '[:space:]')
28-
if [ "$len" -lt 50 ] || [ "$len" -gt 170 ]; then
28+
if [ "$len" -lt 25 ] || [ "$len" -gt 170 ]; then
2929
log_error "Description length must be between 50 and 170 characters (got $len)."
3030
log_info "Your description: \"$description\""
3131
exit 1

scripts/hooks/pre-push

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ while read local_ref local_oid remote_ref remote_oid; do
6262

6363
description=$(printf "%s" "$header" | sed -E 's/^(feat|fix|docs|refactor|test)\([^)]+\):[[:space:]]*(.*)$/\2/I')
6464
len=$(printf '%s' "$description" | wc -c | tr -d '[:space:]')
65-
if [ "$len" -lt 50 ] || [ "$len" -gt 170 ]; then
65+
if [ "$len" -lt 25 ] || [ "$len" -gt 170 ]; then
6666
log_error "Commit ${commit} on branch '${branch}' has a description length of $len (must be 50-170)."
6767
log_info "Your description: \"$description\""
6868
log_warn "Please provide a more detailed and concise description."

0 commit comments

Comments
 (0)