Skip to content

Commit eec9e7f

Browse files
committed
Avoid the pattern verb 'of' something
The git hook is expected to assist students in writing effective commit messages in English. Change-Id: Ib61ee932c433d1b8ee5f18720a0b4ecb21fa1768
1 parent c3579a8 commit eec9e7f

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

scripts/commit-msg.hook

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -300,6 +300,11 @@ done
300300
add_warning 1 "Commit subject should use imperative mood"
301301
fi
302302

303+
# 7d. Alert if the commit subject uses the pattern "Implement of ..."
304+
if [[ "${COMMIT_SUBJECT_TO_PROCESS}" =~ ^(Implement|Realize|Update|Finish|Code)[[:space:]]+of[[:space:]]+ ]]; then
305+
add_warning 1 "Avoid using 'of' immediately after the verb"
306+
fi
307+
303308
# 8. Use the body to explain what and why vs. how
304309
# ------------------------------------------------------------------------------
305310

0 commit comments

Comments
 (0)