From 3f32f10b1a0792befd559e5b6951cc87f2474071 Mon Sep 17 00:00:00 2001 From: tianshuo78520a <707759223@qq.com> Date: Thu, 18 May 2023 16:28:41 +0800 Subject: [PATCH] Check print log (#53725) * test=document_fix * test=document_fix --- tools/check_file_diff_approvals.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tools/check_file_diff_approvals.sh b/tools/check_file_diff_approvals.sh index f2fb9d86cdf..9be51d2154d 100644 --- a/tools/check_file_diff_approvals.sh +++ b/tools/check_file_diff_approvals.sh @@ -341,6 +341,12 @@ if [ "${INVALID_UNITTEST_ASSERT_CHECK}" != "" ] && [ "${GIT_PR_ID}" != "" ]; the check_approval 1 16605440 6836917 fi +OUTPUT_LOG=`echo "$ALL_ADDED_LINES" | grep -Ew "print|printf|fprintf|std::cout" || true` +if [ "$OUTPUT_LOG" != "" ];then + echo_line="print or std::cout is not recommended for direct use, please use loggin or glog. If it is necessary to use, please contact tianshuo78520a (Recommend) or zhangbo9674 review and approve.\n" + check_approval 1 tianshuo7852a zhangbo9674 +fi + HAS_MODIFIED_PHI_FILES=`git diff --name-only upstream/$BRANCH | grep "paddle/phi/" || true` PHI_INCLUDE_FLUID_FILES="" for CHANGE_FILE in ${HAS_MODIFIED_PHI_FILES}; do -- GitLab