@@ -26,12 +26,12 @@ diff_files=$(git diff --name-only --diff-filter=ACMR ${BRANCH})
2626num_diff_files=$( echo " $diff_files " | wc -l)
2727echo -e " diff files between pr and ${BRANCH} :\n${diff_files} "
2828
29- echo " Checking code style by prek ..."
30- prek run --files ${diff_files} ; check_error=$?
29+ echo " Checking code style by pre-commit ..."
30+ pre-commit run --files ${diff_files} ; check_error=$?
3131
3232if test ! -z " $( git diff) " ; then
3333 echo -e ' \n************************************************************************************'
34- echo -e " These files have been formatted by code format hook. You should use prek to \
34+ echo -e " These files have been formatted by code format hook. You should use pre-commit to \
3535format them before git push."
3636 echo -e ' ************************************************************************************\n'
3737 git diff 2>&1
4040echo -e ' \n************************************************************************************'
4141if [ ${check_error} != 0 ]; then
4242 echo " Your PR code style check failed."
43- echo " Please install prek locally and set up git hook scripts:"
43+ echo " Please install pre-commit locally and set up git hook scripts:"
4444 echo " "
45- echo " pip install prek "
46- echo " prek install"
45+ echo " pip install pre-commit "
46+ echo " pre-commit install"
4747 echo " "
4848 if [[ $num_diff_files -le 100 ]]; then
49- echo " Then, run prek to check codestyle issues in your PR:"
49+ echo " Then, run pre-commit to check codestyle issues in your PR:"
5050 echo " "
51- echo " prek run --files" $( echo ${diff_files} | tr " \n" " " )
51+ echo " pre-commit run --files" $( echo ${diff_files} | tr " \n" " " )
5252 echo " "
5353 fi
5454 echo " For more information, please refer to our codestyle check guide:"
0 commit comments