github-actions[bot] commented on PR #41070:
URL: https://github.com/apache/doris/pull/41070#issuecomment-2363307322
#### `sh-checker report`
To get the full details, please check in the
[job]("https://github.com/apache/doris/actions/runs/10956972901") output.
<details>
<summary>shellcheck errors</summary>
```
'shellcheck ' returned error 1 finding the following syntactical issues:
----------
In build.sh line 888:
mkdir -p ${DORIS_HOME}/output/tools
^-----------^ SC2086 (info): Double quote to prevent globbing and
word splitting.
Did you mean:
mkdir -p "${DORIS_HOME}"/output/tools
In build.sh line 889:
cp -r -p tools/fdb ${DORIS_HOME}/output/tools
^-----------^ SC2086 (info): Double quote to prevent
globbing and word splitting.
Did you mean:
cp -r -p tools/fdb "${DORIS_HOME}"/output/tools
In tools/fdb/fdb_ctl.sh line 141:
local min_processes=1
^-----------^ SC2034 (warning): min_processes appears unused.
Verify use (or export if used externally).
In tools/fdb/fdb_ctl.sh line 149:
IFS=':' read -r num_storage num_stateless num_log
<<<"$STORAGE_STATELESS_LOG_RATIO"
^--------------------------^ SC2250 (style): Prefer putting braces around
variable references even when not strictly required.
Did you mean:
IFS=':' read -r num_storage num_stateless num_log
<<<"${STORAGE_STATELESS_LOG_RATIO}"
In tools/fdb/fdb_ctl.sh line 159:
if [ "#$MEDIUM_TYPE" = "#HDD" ]; then
^--------------------------^ SC2292 (style): Prefer [[ ]] over [ ]
for tests in Bash/Ksh.
^----------^ SC2250 (style): Prefer putting braces around
variable references even when not strictly required.
Did you mean:
if [[ "#${MEDIUM_TYPE}" = "#HDD" ]]; then
In tools/fdb/fdb_ctl.sh line 199:
IFS=',' read -r -a IPS <<<"$FDB_CLUSTER_IPS"
^--------------^ SC2250 (style): Prefer
putting braces around variable references even when not strictly required.
Did you mean:
IFS=',' read -r -a IPS <<<"${FDB_CLUSTER_IPS}"
In tools/fdb/fdb_ctl.sh line 201:
if [[ -z $(which ping) ]]; then
^---^ SC2230 (info): 'which' is non-standard. Use builtin
'command -v' instead.
In tools/fdb/fdb_ctl.sh line 214:
if [ ${CPU_CORES_LIMIT} -gt $(nproc) ]; then
^-- SC2292 (style): Prefer [[ ]] over [ ] for tests in Bash/Ksh.
^----------------^ SC2248 (style): Prefer double quoting even when
variables don't contain special characters.
^------^ SC2046 (warning): Quote this to
prevent word splitting.
Did you mean:
if [[ "${CPU_CORES_LIMIT}" -gt $(nproc) ]]; then
In tools/fdb/fdb_ctl.sh line 219:
if [ ${MEMORY_LIMIT_GB} -gt $(free -g | awk '/^Mem:/{print $2}') ]; then
^-- SC2292 (style): Prefer [[ ]] over [ ] for tests in Bash/Ksh.
^----------------^ SC2248 (style): Prefer double quoting even when
variables don't contain special characters.
^-- SC2046 (warning): Quote this to prevent
word splitting.
Did you mean:
if [[ "${MEMORY_LIMIT_GB}" -gt $(free -g | awk '/^Mem:/{print $2}') ]];
then
In tools/fdb/fdb_ctl.sh line 241:
if [ ! -z "$(ls -A ${DIR})" ]; then
^------------------------^ SC2292 (style): Prefer [[ ]] over [ ]
for tests in Bash/Ksh.
^-- SC2236 (style): Use -n instead of ! -z.
^----^ SC2086 (info): Double quote to prevent
globbing and word splitting.
Did you mean:
if [[ ! -z "$(ls -A "${DIR}")" ]]; then
In tools/fdb/fdb_ctl.sh line 279:
if [ $storage_processes -eq 0 ]; then
^--------------------------^ SC2292 (style): Prefer [[ ]] over [ ]
for tests in Bash/Ksh.
^----------------^ SC2086 (info): Double quote to prevent globbing
and word splitting.
^----------------^ SC2250 (style): Prefer putting braces around
variable references even when not strictly required.
Did you mean:
if [[ "${storage_processes}" -eq 0 ]]; then
In tools/fdb/fdb_ctl.sh line 424:
echo "fdb_cluster = $(cat ${FDB_HOME}/conf/fdb.cluster)"
^---------^ SC2248 (style): Prefer double
quoting even when variables don't contain special characters.
Did you mean:
echo "fdb_cluster = $(cat "${FDB_HOME}"/conf/fdb.cluster)"
For more information:
https://www.shellcheck.net/wiki/SC2034 -- min_processes appears unused.
Ver...
https://www.shellcheck.net/wiki/SC2046 -- Quote this to prevent word
splitt...
https://www.shellcheck.net/wiki/SC2086 -- Double quote to prevent globbing
...
----------
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
@@ -886,7 +886,7 @@
fi
mkdir -p ${DORIS_HOME}/output/tools
-cp -r -p tools/fdb ${DORIS_HOME}/output/tools
+cp -r -p tools/fdb ${DORIS_HOME}/output/tools
echo "***************************************"
echo "Successfully build Doris"
--- tools/fdb/fdb_vars.sh.orig
+++ tools/fdb/fdb_vars.sh
----------
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]