From 7e16ef30ad31899ab9279fbe888738186a55522a Mon Sep 17 00:00:00 2001 From: Eric Yang Date: Tue, 12 Nov 2024 16:50:19 -0800 Subject: [PATCH] Update code_style_check.sh (#243) --- ci/code_style_check.sh | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/ci/code_style_check.sh b/ci/code_style_check.sh index 83024e9b..699e4e16 100755 --- a/ci/code_style_check.sh +++ b/ci/code_style_check.sh @@ -61,6 +61,10 @@ FIX_FORMAT_FLAG=${1} LICENSE_CHECK_RESULT=$? +if [[ ${LICENSE_CHECK_RESULT} != 0 ]]; then + echo "License check failed. Please fix the corresponding licenses." +fi + ############################################################ # Python formatting ############################################################ @@ -72,12 +76,16 @@ echo "Testing python formatting with ${PYINK_COMMAND}" ${PYINK_COMMAND} PYTHON_FORMAT_RESULT=$? -# Re-enable exit on error now that we are done with the temporary git repo. -set -e - +if [[ ${PYTHON_FORMAT_RESULT} != 0 ]]; then + echo "Python formatting issues found." + echo "To apply formatting automatically, run: ./format.sh" +fi if [[ ${LICENSE_CHECK_RESULT} != 0 || \ ${PYTHON_FORMAT_RESULT} != 0 \ ]] then exit 1 -fi \ No newline at end of file +fi + +# Re-enable exit on error now that we are done with the temporary git repo. +set -e