Simplify the prompt of const_cast check. (#29548)

只检查增的情况,不检查删除情况
revert-31562-mean
Ren Wei (任卫) 5 years ago committed by GitHub
parent 8d549fc85d
commit a9082082d0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -154,9 +154,9 @@ for API_FILE in ${API_FILES[*]}; do
done
FILTER=`git diff --name-only upstream/develop | grep -v "tools/"`
HAS_CONST_CAST=`git diff -U0 upstream/$BRANCH $FILTER |grep -o -m 1 "const_cast" || true`
HAS_CONST_CAST=`git diff -U0 upstream/$BRANCH $FILTER | grep '^\+' | grep -o -m 1 "const_cast" || true`
if [ ${HAS_CONST_CAST} ] && [ "${GIT_PR_ID}" != "" ]; then
echo_line="You must have one RD (XiaoguangHu01,Xreki,luotao1) approval for the usage (either add or delete) of const_cast.\n"
echo_line="You must have one RD (XiaoguangHu01,Xreki,luotao1) approval for the usage of const_cast.\n"
check_approval 1 46782768 12538138 6836917
fi

Loading…
Cancel
Save