You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by GitBox <gi...@apache.org> on 2021/09/14 07:58:08 UTC

[GitHub] [incubator-mxnet] anko-intel commented on a change in pull request #20433: [Feature][Master] Clang-format tool to perform additional formatting and semantic checking of code.

anko-intel commented on a change in pull request #20433:
URL: https://github.com/apache/incubator-mxnet/pull/20433#discussion_r707994914



##########
File path: ci/docker/runtime_functions.sh
##########
@@ -716,6 +717,42 @@ sanity_cpp() {
     3rdparty/dmlc-core/scripts/lint.py mxnet cpp include src plugin cpp-package tests --exclude_path src/operator/contrib/ctc_include include/onednn
 }
 
+sanity_clang() {
+    set -ex
+    # .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}"
+    GITHUB_BASE_REF="${GITHUB_PR_BASE_REF}"
+
+    if [ "${BASE_SHA}" == "" ]; then
+        BASE_SHA=`git show-ref --hash refs/remotes/origin/master`
+        if [ "${GITHUB_RUN_ID}" == "" ] || [ "${GITHUB_BASE_REF}" == "" ]; then
+             GITHUB_RUN_ID=`(git log --pretty=format:'%h' -n 1)`
+             GITHUB_BASE_REF="master"
+        fi
+    fi
+
+    git remote add "${GITHUB_RUN_ID}" https://github.com/apache/incubator-mxnet.git
+    git fetch "${GITHUB_RUN_ID}" "$GITHUB_BASE_REF"
+
+    echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
+    echo "| clang-format failures found! Run: "

Review comment:
       I looks like it will be always shown, even without failure




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@mxnet.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org