FelixYBW commented on code in PR #6907:
URL: https://github.com/apache/incubator-gluten/pull/6907#discussion_r1723681654


##########
dev/formatcppcode.sh:
##########
@@ -1,13 +1,25 @@
 cd `dirname $0`
 
-# Check if clang-format-15 is installed
-if ! command -v clang-format-15 &> /dev/null
-then
-    echo "clang-format-15 could not be found"
-    echo "Installing clang-format-15..."
-    sudo apt update
-    sudo apt install clang-format-15
+CLANG_FORMAT_CMD=""
+if [ "$(uname)" == "Darwin" ]; then
+    CLANG_FORMAT_CMD="clang-format"
+    if ! command -v $CLANG_FORMAT_CMD &> /dev/null
+    then
+        echo "$CLANG_FORMAT_CMD could not be found"
+        echo "Installing $CLANG_FORMAT_CMD..."
+        sudo brew install $CLANG_FORMAT_CMD
+    fi
+else
+    CLANG_FORMAT_CMD="clang-format-18"
+    if ! command -v $CLANG_FORMAT_CMD &> /dev/null
+    then
+        echo "$CLANG_FORMAT_CMD could not be found"
+        echo "Installing $CLANG_FORMAT_CMD..."
+        sudo apt update
+        sudo apt install $CLANG_FORMAT_CMD
+    fi
 fi

Review Comment:
   Let's remove the install commands here. It's only for darwin and ubuntu.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to