未验证 提交 109ffffb 编写于 作者: T tianshuo78520a 提交者: GitHub

Update code format (#24000)

上级 6f5669f9
...@@ -279,12 +279,18 @@ function check_style() { ...@@ -279,12 +279,18 @@ function check_style() {
pre-commit install pre-commit install
clang-format --version clang-format --version
commit_files=on
for file_name in `git diff --numstat upstream/$BRANCH |awk '{print $NF}'`;do for file_name in `git diff --numstat upstream/$BRANCH |awk '{print $NF}'`;do
if ! pre-commit run --files $file_name ; then if ! pre-commit run --files $file_name ; then
git diff git diff
exit 1 commit_files=off
fi fi
done done
if [ $commit_files == 'off' ];then
echo "code format error"
exit 1
fi
trap : 0 trap : 0
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册