From e27782c1c56a3cb95b7f4804fc243cdd4863cade Mon Sep 17 00:00:00 2001 From: Lidi Zheng Date: Wed, 11 Dec 2019 18:08:33 -0800 Subject: [PATCH] Simplify the check buildifier script logic --- tools/distrib/buildifier_format_code.sh | 2 +- tools/run_tests/sanity/check_buildifier.sh | 9 +++------ 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/tools/distrib/buildifier_format_code.sh b/tools/distrib/buildifier_format_code.sh index f205c6c4bb5..06b52767dec 100755 --- a/tools/distrib/buildifier_format_code.sh +++ b/tools/distrib/buildifier_format_code.sh @@ -1,4 +1,4 @@ -#! /bin/bash -ex +#! /bin/bash -e # Copyright 2019 The gRPC Authors # # Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/tools/run_tests/sanity/check_buildifier.sh b/tools/run_tests/sanity/check_buildifier.sh index 37a346c8ee6..115a74fd353 100755 --- a/tools/run_tests/sanity/check_buildifier.sh +++ b/tools/run_tests/sanity/check_buildifier.sh @@ -1,4 +1,4 @@ -#! /bin/bash -x +#! /bin/bash # Copyright 2019 The gRPC Authors # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -13,13 +13,10 @@ # See the License for the specific language governing permissions and # limitations under the License. # -# The script to sanitize Bazel files +# The script to check if Bazel files needs to be formatted. GIT_ROOT="$(dirname "$0")/../../.." -TMP_ROOT="/tmp/buildifier_grpc" -rm -rf "${TMP_ROOT}" -git clone -- "$GIT_ROOT" "$TMP_ROOT" -buildifier -r -v -mode=diff $TMP_ROOT +"$GIT_ROOT/tools/distrib/buildifier_format_code.sh" -mode=diff result=$? if [[ ${result} != 0 ]]; then