diff --git a/dev/hooks/pre-push.sh b/dev/hooks/pre-push.sh index ee0158b..749b057 100755 --- a/dev/hooks/pre-push.sh +++ b/dev/hooks/pre-push.sh @@ -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}" diff --git a/doc/5_practice.md b/doc/5_practice.md index 93ec3fd..84e6517 100644 --- a/doc/5_practice.md +++ b/doc/5_practice.md @@ -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" ;; diff --git a/doc/7_develop.md b/doc/7_develop.md index 22e8944..e9e561f 100644 --- a/doc/7_develop.md +++ b/doc/7_develop.md @@ -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""