Skip to content

Commit 044cec3

Browse files
committed
lefthook: Run typos on commit message
Will abort the commit if there are typos.
1 parent 7fdfb6e commit 044cec3

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

lefthook.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,12 @@ pre-commit:
2727
typos:
2828
tags: spellcheck
2929
run: typos --force-exclude -- {staged_files}
30+
# takes one parameter - the file with the proposed commit message
31+
# access through lefthook with `{1}`
32+
#
33+
# If this hook fails, a backup of the commit message is saved in .git/
34+
commit-msg:
35+
commands:
36+
typos-commit:
37+
tags: spellcheck
38+
run: typos -- {1}

0 commit comments

Comments
 (0)