小编mel*_*oth的帖子

Git Hook Spellchecker忽略缩进线

我正在编写一个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我想忽略缩进的行(两个或多个空格).这将避免有关文件名,注释等的恼人消息.

谢谢!

git hook ignore aspell

2
推荐指数
1
解决办法
424
查看次数

标签 统计

aspell ×1

git ×1

hook ×1

ignore ×1