mel*_*oth 2 git hook ignore aspell
我正在编写一个git钩子,拼写检查我的提交消息.这是我到目前为止:
#!/bin/sh
ASPELL=$(which aspell)
WORDS=$($ASPELL list < "$1")
if [ -n "$WORDS" ]; then
echo -e "Possible spelling errors found in commit message. Consider using git commit --amend to change the message.\n\tPossible mispelled words: " $WORDS
fi
Run Code Online (Sandbox Code Playgroud)
我不知道如何告诉aspell我想忽略缩进的行(两个或多个空格).这将避免有关文件名,注释等的恼人消息.
谢谢!
| 归档时间: |
|
| 查看次数: |
424 次 |
| 最近记录: |