Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

[master][ci] Avoid duplicate log output error when using clang-formatter #20665

Merged
merged 1 commit into from
Oct 18, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions ci/docker/runtime_functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -718,7 +718,8 @@ sanity_cpp() {
}

sanity_clang() {
set -ex
set -e
set +x
# .github/workgflows/greetings.yml passes BASE_SHA, GITHUB_RUN_ID, GITHUB_BASE_REF for pull requests.
BASE_SHA="${GITHUB_PR_BASE_SHA}"
GITHUB_RUN_ID="${GITHUB_PR_RUN_ID}"
Expand All @@ -741,14 +742,14 @@ sanity_clang() {
git remote remove "${GITHUB_RUN_ID}" # temporary remote is removed
exit 0
fi

echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
echo "| clang-format failures found! Run: "
echo "| tool/lint/clang_format_ci.sh ${BASE_SHA} "
echo "| Clang-format failures found! Run: "
echo "| tools/lint/clang_format_ci.sh ${BASE_SHA} "
echo "| to fix this error. "
echo "| For more info, see: "
echo "| For more info, see: https://mxnet.apache.org/versions/master/community/clang_format_guide"
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"

echo "$GIT_DIFFERENCE"
git remote remove "${GITHUB_RUN_ID}" # temporary remote is removed
exit 1
Expand Down
2 changes: 1 addition & 1 deletion tools/lint/clang_format_ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@
# under the License.

#!/bin/sh
set -eux
set -eu
tools/lint/git-clang-format-13 --verbose "$1" --