use codespell for english text in git hooks

This commit is contained in:
Kay Marquardt (Gnadelwartz) 2020-06-23 17:42:34 +02:00
parent d2a578a757
commit fb61a488c6
3 changed files with 12 additions and 2 deletions

View File

@ -20,5 +20,15 @@ echo "............................"
unset IFS; set -f
if which codespell &>/dev/null; then
echo "Running codespell"
echo "............................"
codespell -B 1 --skip="*.log,*.html,*.txt,.git*" -L "ba"
echo "if there are (to many) errors shown, consider running:"
echo "codespell -i 3 -w --skip=\"*.log,*.html,*.txt,.git*\""
else
echo "consider installing codespell: pip install codespell"
fi
echo "............................"
# note date of last push for version
touch "${LASTPUSH}"

View File

@ -77,7 +77,7 @@ If a command need more than 2-3 lines of code, you should use a function to sepa
mycommands() {
case "$MESSAGE" in
'/process'*) # logic for /process is done in process_message
'/doit'*) # logic for /doit is done in process_message
result="$(process_message "$MESSAGE")"
send_normal_message "${CHAT[ID]}" "$result"
;;

View File

@ -243,7 +243,7 @@ data="$(cat file)" -> data="$(<"file")"
DIR="$(dirname $0) -> DIR="${0%/*}"
IAM="($basename $0)" -> IAM="${0##*/}*
PROG="($basename $0)" -> PROG="${0##*/}*
ADDME="$ADDME something to add" -> ADDME+=" something to add""