From efc37959a27b3bbfb865e32491e22703c8ae2e9a Mon Sep 17 00:00:00 2001 From: betterpig Date: Thu, 2 Jun 2022 13:03:28 +0000 Subject: [PATCH] cpplint set version 1.6.0;test=document_fix --- paddle/fluid/operators/abs_op.cc | 4 +++- paddle/scripts/paddle_build.sh | 8 ++++---- tools/codestyle/cpplint_pre_commit.hook | 1 - 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/paddle/fluid/operators/abs_op.cc b/paddle/fluid/operators/abs_op.cc index 7bd7f8c16b64c..b9517e1cc863c 100644 --- a/paddle/fluid/operators/abs_op.cc +++ b/paddle/fluid/operators/abs_op.cc @@ -170,7 +170,9 @@ DECLARE_INFER_SHAPE_FUNCTOR(abs, AbsInferShapeFunctor, namespace ops = paddle::operators; -REGISTER_OPERATOR(abs, ops::AbsOp, ops::AbsOpMaker,ops::AbsGradMaker,ops::AbsGradMaker, +REGISTER_OPERATOR(abs, ops::AbsOp, ops::AbsOpMaker, + ops::AbsGradMaker, + ops::AbsGradMaker, AbsInferShapeFunctor); REGISTER_OPERATOR(abs_grad, ops::AbsGradOp, diff --git a/paddle/scripts/paddle_build.sh b/paddle/scripts/paddle_build.sh index 88eeeb4e1a3fa..b96283636f8fd 100755 --- a/paddle/scripts/paddle_build.sh +++ b/paddle/scripts/paddle_build.sh @@ -370,11 +370,11 @@ function check_style() { commit_files=on for file_name in `git diff --numstat ${BRANCH} |awk '{print $NF}'`;do - if ! pre-commit run --verbose --files $file_name ; then + if ! pre-commit run --files $file_name ; then commit_files=off fi done - + export PATH=${OLD_PATH} if [ $commit_files == 'off' ];then @@ -3347,7 +3347,7 @@ function main() { ;; build_and_check_gpu) set +e - + set +x check_style_info=$(check_style) check_style_code=$? example_info_gpu="" @@ -3359,7 +3359,7 @@ function main() { example_info=$(exec_samplecode_test cpu) example_code=$? summary_check_problems $check_style_code $[${example_code_gpu} + ${example_code}] "$check_style_info" "${example_info_gpu}\n${example_info}" - + set -x assert_api_spec_approvals ;; check_whl_size) diff --git a/tools/codestyle/cpplint_pre_commit.hook b/tools/codestyle/cpplint_pre_commit.hook index 2986c6a4dba70..cef11ab1351b7 100755 --- a/tools/codestyle/cpplint_pre_commit.hook +++ b/tools/codestyle/cpplint_pre_commit.hook @@ -5,7 +5,6 @@ TOTAL_ERRORS=0 readonly VERSION="1.6.0" version=$(cpplint --version) -echo ${version} if [[ ! $TRAVIS_BRANCH ]]; then # install cpplint on local machine.