Skip to content

Commit bb2d2be

Browse files
committed
Filter out hyperlinks
There is no need to validate the hyperlinks with spell checkers. Change-Id: I517836c006132c8373f13265672f64cee271dd82
1 parent a3d4a0b commit bb2d2be

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

scripts/commit-msg.hook

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,8 @@ validate_commit_message() {
322322
# 12. Avoid abusive language in commit message content
323323
# ------------------------------------------------------------------------------
324324

325-
FULL_COMMIT_MSG=$(sed '/^#/d;/^[[:space:]]*$/d;/^[[:space:]]*Change-Id:/d' "$COMMIT_MSG_FILE")
325+
FULL_COMMIT_MSG=$(sed '/^#/d;/^[[:space:]]*$/d;/^[[:space:]]*Change-Id:/d' "$COMMIT_MSG_FILE" | \
326+
sed -E "s@${URL_REGEX#^}@@g")
326327
# Extended list of abusive words (case-insensitive).
327328
# Adjust the list as needed.
328329
ABUSIVE_WORDS_REGEX='\b(fuck|fucking|dick|shit|bitch|asshole|cunt|motherfucker|damn|crap|dumbass|piss)\b'

0 commit comments

Comments
 (0)