github-actions[bot] commented on PR #30054:
URL: https://github.com/apache/doris/pull/30054#issuecomment-1895285154
#### `sh-checker report`
To get the full details, please check in the
[job]("https://github.com/apache/doris/actions/runs/7552682081") output.
<details>
<summary>shellcheck errors</summary>
```
'shellcheck ' returned error 1 finding the following syntactical issues:
----------
In build.sh line 567:
MAKE_PROGRAM="$(which "${BUILD_SYSTEM}")"
^---^ SC2230 (info): 'which' is non-standard. Use
builtin 'command -v' instead.
In cloud/script/start.sh line 18:
curdir="$(cd "$(dirname $(readlink -f ${BASH_SOURCE[0]}))" &>/dev/null &&
pwd)"
^-- SC2046 (warning): Quote this to prevent word
splitting.
^---------------^ SC2086 (info):
Double quote to prevent globbing and word splitting.
Did you mean:
curdir="$(cd "$(dirname $(readlink -f "${BASH_SOURCE[0]}"))" &>/dev/null &&
pwd)"
In cloud/script/start.sh line 20:
cd "${curdir}/.."
^---------------^ SC2164 (warning): Use 'cd ... || exit' or 'cd ... ||
return' in case cd fails.
Did you mean:
cd "${curdir}/.." || exit
In cloud/script/start.sh line 24:
cd "${doris_cloud_home}"
^----------------------^ SC2164 (warning): Use 'cd ... || exit' or 'cd ...
|| return' in case cd fails.
Did you mean:
cd "${doris_cloud_home}" || exit
In cloud/script/stop.sh line 18:
curdir="$(cd "$(dirname $(readlink -f ${BASH_SOURCE[0]}))" &>/dev/null &&
pwd)"
^-- SC2046 (warning): Quote this to prevent word
splitting.
^---------------^ SC2086 (info):
Double quote to prevent globbing and word splitting.
Did you mean:
curdir="$(cd "$(dirname $(readlink -f "${BASH_SOURCE[0]}"))" &>/dev/null &&
pwd)"
In cloud/script/stop.sh line 20:
cd "${curdir}/.."
^---------------^ SC2164 (warning): Use 'cd ... || exit' or 'cd ... ||
return' in case cd fails.
Did you mean:
cd "${curdir}/.." || exit
In cloud/script/stop.sh line 24:
cd "${doris_cloud_home}"
^----------------------^ SC2164 (warning): Use 'cd ... || exit' or 'cd ...
|| return' in case cd fails.
Did you mean:
cd "${doris_cloud_home}" || exit
In gensrc/script/gen_build_version.sh line 211:
if [ -f /etc/os-release ]; then
^--------------------^ SC2292 (style): Prefer [[ ]] over [ ] for tests in
Bash/Ksh.
Did you mean:
if [[ -f /etc/os-release ]]; then
In gensrc/script/gen_build_version.sh line 212:
build_os_version=$(cat /etc/os-release | head -n2 | tr '\n' ' ')
^-------------^ SC2002 (style): Useless cat.
Consider 'cmd < file | ..' or 'cmd file | ..' instead.
In gensrc/script/gen_build_version.sh line 232:
build_initiator="${user}@${hostname}"
^-----^ SC2154 (warning): user is referenced but not
assigned.
For more information:
https://www.shellcheck.net/wiki/SC2046 -- Quote this to prevent word
splitt...
https://www.shellcheck.net/wiki/SC2154 -- user is referenced but not
assign...
https://www.shellcheck.net/wiki/SC2164 -- Use 'cd ... || exit' or 'cd ...
|...
----------
You can address the above issues in one of three ways:
1. Manually correct the issue in the offending shell script;
2. Disable specific issues by adding the comment:
# shellcheck disable=NNNN
above the line that contains the issue, where NNNN is the error code;
3. Add '-e NNNN' to the SHELLCHECK_OPTS setting in your .yml action file.
```
</details>
<details>
<summary>shfmt errors</summary>
```
'shfmt ' returned error 1 finding the following formatting issues:
----------
--- build.sh.orig
+++ build.sh
@@ -553,7 +553,7 @@
fi
# Clean and build cloud
-if [[ "${BUILD_CLOUD}" -eq 1 ]] ; then
+if [[ "${BUILD_CLOUD}" -eq 1 ]]; then
if [[ -e "${DORIS_HOME}/gensrc/build/gen_cpp/cloud_version.h" ]]; then
rm -f "${DORIS_HOME}/gensrc/build/gen_cpp/cloud_version.h"
fi
@@ -569,26 +569,25 @@
echo "-- Extra cxx flags: ${EXTRA_CXX_FLAGS:-}"
mkdir -p "${CMAKE_BUILD_DIR}"
cd "${CMAKE_BUILD_DIR}"
- "${CMAKE_CMD}" -G "${GENERATOR}" \
- -DCMAKE_MAKE_PROGRAM="${MAKE_PROGRAM}" \
- -DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
- -DCMAKE_BUILD_TYPE="${CMAKE_BUILD_TYPE}" \
- -DMAKE_TEST=OFF \
- "${CMAKE_USE_CCACHE}" \
- -DUSE_LIBCPP="${USE_LIBCPP}" \
- -DSTRIP_DEBUG_INFO="${STRIP_DEBUG_INFO}" \
- -DUSE_DWARF="${USE_DWARF}" \
- -DUSE_JEMALLOC="${USE_JEMALLOC}" \
- -DEXTRA_CXX_FLAGS="${EXTRA_CXX_FLAGS}" \
- -DBUILD_CHECK_META="${BUILD_CHECK_META:-OFF}" \
- "${DORIS_HOME}/cloud/"
+ "${CMAKE_CMD}" -G "${GENERATOR}" \
+ -DCMAKE_MAKE_PROGRAM="${MAKE_PROGRAM}" \
+ -DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
+ -DCMAKE_BUILD_TYPE="${CMAKE_BUILD_TYPE}" \
+ -DMAKE_TEST=OFF \
+ "${CMAKE_USE_CCACHE}" \
+ -DUSE_LIBCPP="${USE_LIBCPP}" \
+ -DSTRIP_DEBUG_INFO="${STRIP_DEBUG_INFO}" \
+ -DUSE_DWARF="${USE_DWARF}" \
+ -DUSE_JEMALLOC="${USE_JEMALLOC}" \
+ -DEXTRA_CXX_FLAGS="${EXTRA_CXX_FLAGS}" \
+ -DBUILD_CHECK_META="${BUILD_CHECK_META:-OFF}" \
+ "${DORIS_HOME}/cloud/"
"${BUILD_SYSTEM}" -j "${PARALLEL}"
"${BUILD_SYSTEM}" install
cd "${DORIS_HOME}"
echo "Build cloud done"
fi
-
if [[ "${BUILD_DOCS}" = "ON" ]]; then
# Build docs, should be built before Frontend
echo "Build docs"
--- gensrc/script/gen_build_version.sh.orig
+++ gensrc/script/gen_build_version.sh
@@ -258,4 +258,3 @@
} // namespace doris::cloud
EOF
-
--- run-cloud-ut.sh.orig
+++ run-cloud-ut.sh
@@ -67,7 +67,6 @@
exit 1
}
-
if ! OPTS=$(getopt -n "$0" -o vhj:f: -l run,clean,filter:,fdb:,coverage --
"$@"); then
usage
fi
----------
You can reformat the above files to meet shfmt's requirements by typing:
shfmt -w filename
```
</details>
--
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]