diff options
Diffstat (limited to 'misc')
-rwxr-xr-x | misc/hooks/pre-commit-black | 16 | ||||
-rwxr-xr-x | misc/hooks/pre-commit-clang-format | 16 | ||||
-rw-r--r-- | misc/scripts/codespell.sh | 5 |
3 files changed, 21 insertions, 16 deletions
diff --git a/misc/hooks/pre-commit-black b/misc/hooks/pre-commit-black index 8e22e6068e..fd93bfe73c 100755 --- a/misc/hooks/pre-commit-black +++ b/misc/hooks/pre-commit-black @@ -139,11 +139,11 @@ fi while true; do if [ $terminal = "0" ] ; then if [ -x "$ZENITY" ] ; then - ans=$($ZENITY --text-info --filename="$patch" --width=800 --height=600 --title="Do you want to apply that patch?" --ok-label="Apply" --cancel-label="Do not apply" --extra-button="Apply and stage") + choice=$($ZENITY --text-info --filename="$patch" --width=800 --height=600 --title="Do you want to apply that patch?" --ok-label="Apply" --cancel-label="Do not apply" --extra-button="Apply and stage") if [ "$?" = "0" ] ; then yn="Y" else - if [ "$ans" = "Apply and stage" ] ; then + if [ "$choice" = "Apply and stage" ] ; then yn="S" else yn="N" @@ -151,10 +151,10 @@ while true; do fi elif [ -x "$XMSG" ] ; then $XMSG -file "$patch" -buttons "Apply":100,"Apply and stage":200,"Do not apply":0 -center -default "Do not apply" -geometry 800x600 -title "Do you want to apply that patch?" - ans=$? - if [ "$ans" = "100" ] ; then + choice=$? + if [ "$choice" = "100" ] ; then yn="Y" - elif [ "$ans" = "200" ] ; then + elif [ "$choice" = "200" ] ; then yn="S" else yn="N" @@ -162,10 +162,10 @@ while true; do elif [ \( \( "$OSTYPE" = "msys" \) -o \( "$OSTYPE" = "win32" \) \) -a \( -x "$PWSH" \) ]; then winmessage="$(canonicalize_filename "./.git/hooks/winmessage.ps1")" $PWSH -noprofile -executionpolicy bypass -file "$winmessage" -file "$patch" -buttons "Apply":100,"Apply and stage":200,"Do not apply":0 -center -default "Do not apply" -geometry 800x600 -title "Do you want to apply that patch?" - ans=$? - if [ "$ans" = "100" ] ; then + choice=$? + if [ "$choice" = "100" ] ; then yn="Y" - elif [ "$ans" = "200" ] ; then + elif [ "$choice" = "200" ] ; then yn="S" else yn="N" diff --git a/misc/hooks/pre-commit-clang-format b/misc/hooks/pre-commit-clang-format index de5d9c3f06..2ee3f569d5 100755 --- a/misc/hooks/pre-commit-clang-format +++ b/misc/hooks/pre-commit-clang-format @@ -179,11 +179,11 @@ fi while true; do if [ $terminal = "0" ] ; then if [ -x "$ZENITY" ] ; then - ans=$($ZENITY --text-info --filename="$patch" --width=800 --height=600 --title="Do you want to apply that patch?" --ok-label="Apply" --cancel-label="Do not apply" --extra-button="Apply and stage") + choice=$($ZENITY --text-info --filename="$patch" --width=800 --height=600 --title="Do you want to apply that patch?" --ok-label="Apply" --cancel-label="Do not apply" --extra-button="Apply and stage") if [ "$?" = "0" ] ; then yn="Y" else - if [ "$ans" = "Apply and stage" ] ; then + if [ "$choice" = "Apply and stage" ] ; then yn="S" else yn="N" @@ -191,10 +191,10 @@ while true; do fi elif [ -x "$XMSG" ] ; then $XMSG -file "$patch" -buttons "Apply":100,"Apply and stage":200,"Do not apply":0 -center -default "Do not apply" -geometry 800x600 -title "Do you want to apply that patch?" - ans=$? - if [ "$ans" = "100" ] ; then + choice=$? + if [ "$choice" = "100" ] ; then yn="Y" - elif [ "$ans" = "200" ] ; then + elif [ "$choice" = "200" ] ; then yn="S" else yn="N" @@ -202,10 +202,10 @@ while true; do elif [ \( \( "$OSTYPE" = "msys" \) -o \( "$OSTYPE" = "win32" \) \) -a \( -x "$PWSH" \) ]; then winmessage="$(canonicalize_filename "./.git/hooks/winmessage.ps1")" $PWSH -noprofile -executionpolicy bypass -file "$winmessage" -file "$patch" -buttons "Apply":100,"Apply and stage":200,"Do not apply":0 -center -default "Do not apply" -geometry 800x600 -title "Do you want to apply that patch?" - ans=$? - if [ "$ans" = "100" ] ; then + choice=$? + if [ "$choice" = "100" ] ; then yn="Y" - elif [ "$ans" = "200" ] ; then + elif [ "$choice" = "200" ] ; then yn="S" else yn="N" diff --git a/misc/scripts/codespell.sh b/misc/scripts/codespell.sh new file mode 100644 index 0000000000..2822c6421b --- /dev/null +++ b/misc/scripts/codespell.sh @@ -0,0 +1,5 @@ +#!/bin/sh +SKIP_LIST="./thirdparty,*.gen.*,*.po,*.pot,package-lock.json,./core/string/locales.h,./DONORS.md,./misc/scripts/codespell.sh" +IGNORE_LIST="ba,childs,curvelinear,expct,fave,findn,gird,inout,lod,nd,numer,ois,ro,statics,te,varn" + +codespell -w -q 3 -S "${SKIP_LIST}" -L "${IGNORE_LIST}" |