github-actions[bot] commented on code in PR #64497:
URL: https://github.com/apache/doris/pull/64497#discussion_r3411676622
##########
build-support/clang-format.sh:
##########
@@ -48,14 +48,14 @@ if [[ -z $(command -v clang-format) ]]; then
exit 1
fi
-CLANG_FORMAT_VERSION=$(clang-format --version | perl -nle 'print $& if
m{version \K[0-9]+}')
+CLANG_FORMAT="${CLANG_FORMAT_BINARY:=$(command -v clang-format)}"
+
Review Comment:
This still does not fully honor `CLANG_FORMAT_BINARY`. The hardcoded
precheck above runs `command -v clang-format` before this assignment, so
`CLANG_FORMAT_BINARY=clang-format-16 ./build-support/clang-format.sh` still
fails on systems that only have the versioned binary and no `clang-format`
shim. The paired `build-support/check-format.sh` also still checks plain
`clang-format`; on this runner `/usr/bin/clang-format` is v18 and
`CLANG_FORMAT_BINARY=clang-format-16 bash build-support/check-format.sh` exits
with `clang-format version is not 16`. Please resolve the selected binary
before both the existence and version checks, and apply the same ordering to
the check-only script so both formatter entry points respect the override.
--
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]