mirror of
https://github.com/octoleo/telegram-bot-bash.git
synced 2024-06-07 04:40:51 +00:00
use codespell for english text in git hooks
This commit is contained in:
parent
d2a578a757
commit
fb61a488c6
|
@ -20,5 +20,15 @@ echo "............................"
|
||||||
|
|
||||||
unset IFS; set -f
|
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
|
# note date of last push for version
|
||||||
touch "${LASTPUSH}"
|
touch "${LASTPUSH}"
|
||||||
|
|
|
@ -77,7 +77,7 @@ If a command need more than 2-3 lines of code, you should use a function to sepa
|
||||||
mycommands() {
|
mycommands() {
|
||||||
|
|
||||||
case "$MESSAGE" in
|
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")"
|
result="$(process_message "$MESSAGE")"
|
||||||
send_normal_message "${CHAT[ID]}" "$result"
|
send_normal_message "${CHAT[ID]}" "$result"
|
||||||
;;
|
;;
|
||||||
|
|
|
@ -243,7 +243,7 @@ data="$(cat file)" -> data="$(<"file")"
|
||||||
|
|
||||||
DIR="$(dirname $0) -> DIR="${0%/*}"
|
DIR="$(dirname $0) -> DIR="${0%/*}"
|
||||||
|
|
||||||
IAM="($basename $0)" -> IAM="${0##*/}*
|
PROG="($basename $0)" -> PROG="${0##*/}*
|
||||||
|
|
||||||
ADDME="$ADDME something to add" -> ADDME+=" something to add""
|
ADDME="$ADDME something to add" -> ADDME+=" something to add""
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user