Skip to content

Commit 369b2b1

Browse files
authored
remove pre-commit in statick check ci (#43781)
1 parent e6d81dd commit 369b2b1

File tree

1 file changed

+9
-31
lines changed

1 file changed

+9
-31
lines changed

paddle/scripts/paddle_build.sh

Lines changed: 9 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -3206,30 +3206,14 @@ function test_model_benchmark() {
32063206

32073207
function summary_check_problems() {
32083208
set +x
3209-
local check_style_code=$1
3210-
local example_code=$2
3211-
local check_style_info=$3
3212-
local example_info=$4
3213-
if [ $check_style_code -ne 0 -o $example_code -ne 0 ];then
3214-
echo "========================================"
3215-
echo "summary problems:"
3216-
if [ $check_style_code -ne 0 -a $example_code -ne 0 ];then
3217-
echo "There are 2 errors: Code format error and Example code error."
3218-
else
3219-
[ $check_style_code -ne 0 ] && echo "There is 1 error: Code format error."
3220-
[ $example_code -ne 0 ] && echo "There is 1 error: Example code error."
3221-
fi
3222-
echo "========================================"
3223-
if [ $check_style_code -ne 0 ];then
3224-
echo "*****Code format error***** Please fix it according to the diff information:"
3225-
echo "$check_style_info" | grep "code format error" -A $(echo "$check_style_info" | wc -l)
3226-
fi
3227-
if [ $example_code -ne 0 ];then
3209+
local example_code=$1
3210+
local example_info=$2
3211+
if [ $example_code -ne 0 ];then
3212+
echo "==============================================================================="
32283213
echo "*****Example code error***** Please fix the error listed in the information:"
3214+
echo "==============================================================================="
32293215
echo "$example_info" | grep "API check -- Example Code" -A $(echo "$example_info" | wc -l)
3230-
fi
3231-
[ $check_style_code -ne 0 ] && exit $check_style_code
3232-
[ $example_code -ne 0 ] && exit $example_code
3216+
exit $example_code
32333217
fi
32343218
set -x
32353219
}
@@ -3362,8 +3346,6 @@ function main() {
33623346
;;
33633347
build_and_check)
33643348
set +e
3365-
check_style_info=$(check_style)
3366-
check_style_code=$?
33673349
generate_upstream_develop_api_spec ${PYTHON_ABI:-""} ${parallel_number}
33683350
cmake_gen_and_build ${PYTHON_ABI:-""} ${parallel_number}
33693351
check_sequence_op_unittest
@@ -3377,7 +3359,7 @@ function main() {
33773359
fi
33783360
example_info=$(exec_samplecode_test cpu)
33793361
example_code=$?
3380-
summary_check_problems $check_style_code $[${example_code_gpu} + ${example_code}] "$check_style_info" "${example_info_gpu}\n${example_info}"
3362+
summary_check_problems $[${example_code_gpu} + ${example_code}] "${example_info_gpu}\n${example_info}"
33813363
assert_api_spec_approvals
33823364
;;
33833365
build_and_check_cpu)
@@ -3390,8 +3372,6 @@ function main() {
33903372
build_and_check_gpu)
33913373
set +e
33923374
set +x
3393-
check_style_info=$(check_style)
3394-
check_style_code=$?
33953375
example_info_gpu=""
33963376
example_code_gpu=0
33973377
if [ "${WITH_GPU}" == "ON" ] ; then
@@ -3400,7 +3380,7 @@ function main() {
34003380
fi
34013381
example_info=$(exec_samplecode_test cpu)
34023382
example_code=$?
3403-
summary_check_problems $check_style_code $[${example_code_gpu} + ${example_code}] "$check_style_info" "${example_info_gpu}\n${example_info}"
3383+
summary_check_problems $[${example_code_gpu} + ${example_code}] "${example_info_gpu}\n${example_info}"
34043384
set -x
34053385
assert_api_spec_approvals
34063386
;;
@@ -3614,9 +3594,7 @@ function main() {
36143594
api_example)
36153595
example_info=$(exec_samplecode_test cpu)
36163596
example_code=$?
3617-
check_style_code=0
3618-
check_style_info=
3619-
summary_check_problems $check_style_code $example_code "$check_style_info" "$example_info"
3597+
summary_check_problems $example_code "$example_info"
36203598
;;
36213599
test_op_benchmark)
36223600
test_op_benchmark

0 commit comments

Comments
 (0)