Created
November 16, 2021 10:38
-
-
Save jayu/1d4d2d17c3138b4fbeeeb8e044f25ff1 to your computer and use it in GitHub Desktop.
Git hook to validate commit message with cspell (Spell checker for Visual Studio Code)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
MSG_FILE="$1" | |
echo "🔄 Validating message: $(cat $MSG_FILE | grep --invert-match '#')" | |
cspell "$MSG_FILE" | |
# cspell should be installed -> yarn global add cspell | |
# save this file in .git/hooks/commit-msg |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment