@@ -26,12 +26,12 @@ diff_files=$(git diff --name-only --diff-filter=ACMR ${BRANCH})
26
26
num_diff_files=$( echo " $diff_files " | wc -l)
27
27
echo -e " diff files between pr and ${BRANCH} :\n${diff_files} "
28
28
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=$?
31
31
32
32
if test ! -z " $( git diff) " ; then
33
33
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 \
35
35
format them before git push."
36
36
echo -e ' ************************************************************************************\n'
37
37
git diff 2>&1
40
40
echo -e ' \n************************************************************************************'
41
41
if [ ${check_error} != 0 ]; then
42
42
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:"
44
44
echo " "
45
- echo " pip install prek "
46
- echo " prek install"
45
+ echo " pip install pre-commit "
46
+ echo " pre-commit install"
47
47
echo " "
48
48
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:"
50
50
echo " "
51
- echo " prek run --files" $( echo ${diff_files} | tr " \n" " " )
51
+ echo " pre-commit run --files" $( echo ${diff_files} | tr " \n" " " )
52
52
echo " "
53
53
fi
54
54
echo " For more information, please refer to our codestyle check guide:"
0 commit comments