github-actions[bot] commented on PR #42445: URL: https://github.com/apache/doris/pull/42445#issuecomment-2447332675
#### `sh-checker report` To get the full details, please check in the [job]("https://github.com/apache/doris/actions/runs/11595211828") output. <details> <summary>shellcheck errors</summary> ``` 'shellcheck ' returned error 1 finding the following syntactical issues: ---------- In tools/ssb-tools/bin/create-ssb-tables.sh line 107: if [[ $? -ne 0 ]]; then ^-- SC2181 (style): Check exit code directly with e.g. 'if ! mycmd;', not indirectly with $?. In tools/ssb-tools/bin/create-ssb-tables.sh line 115: if [[ $? -ne 0 ]]; then ^-- SC2181 (style): Check exit code directly with e.g. 'if ! mycmd;', not indirectly with $?. In tools/ssb-tools/bin/create-ssb-tables.sh line 122: if [[ $? -ne 0 ]]; then ^-- SC2181 (style): Check exit code directly with e.g. 'if ! mycmd;', not indirectly with $?. In tools/ssb-tools/bin/create-ssb-tables.sh line 129: if [[ $? -ne 0 ]]; then ^-- SC2181 (style): Check exit code directly with e.g. 'if ! mycmd;', not indirectly with $?. In tools/ssb-tools/bin/create-ssb-tables.sh line 136: if [[ $? -ne 0 ]]; then ^-- SC2181 (style): Check exit code directly with e.g. 'if ! mycmd;', not indirectly with $?. In tools/ssb-tools/bin/create-ssb-tables.sh line 143: if [[ $? -ne 0 ]]; then ^-- SC2181 (style): Check exit code directly with e.g. 'if ! mycmd;', not indirectly with $?. In tools/ssb-tools/bin/create-ssb-tables.sh line 150: if [[ $? -ne 0 ]]; then ^-- SC2181 (style): Check exit code directly with e.g. 'if ! mycmd;', not indirectly with $?. In tools/ssb-tools/bin/run-ssb-flat-queries.sh line 99: echo "Error: Failed to execute the SQL command: $@" >&2 ^-- SC2145 (error): Argument mixes string and array. Use * or separate argument. In tools/ssb-tools/bin/run-ssb-flat-queries.sh line 130: if [[ $? -ne 0 ]]; then ^-- SC2181 (style): Check exit code directly with e.g. 'if ! mycmd;', not indirectly with $?. In tools/ssb-tools/bin/run-ssb-flat-queries.sh line 143: if [[ $? -ne 0 ]]; then ^-- SC2181 (style): Check exit code directly with e.g. 'if ! mycmd;', not indirectly with $?. In tools/ssb-tools/bin/run-ssb-flat-queries.sh line 156: if [[ $? -ne 0 ]]; then ^-- SC2181 (style): Check exit code directly with e.g. 'if ! mycmd;', not indirectly with $?. In tools/ssb-tools/bin/run-ssb-queries.sh line 99: echo "Error: Failed to execute the SQL command: $@" >&2 ^-- SC2145 (error): Argument mixes string and array. Use * or separate argument. In tools/tpcds-tools/bin/create-tpcds-tables.sh line 106: if [[ $? -ne 0 ]]; then ^-- SC2181 (style): Check exit code directly with e.g. 'if ! mycmd;', not indirectly with $?. In tools/tpcds-tools/bin/create-tpcds-tables.sh line 112: if [[ $? -ne 0 ]]; then ^-- SC2181 (style): Check exit code directly with e.g. 'if ! mycmd;', not indirectly with $?. In tools/tpcds-tools/bin/create-tpcds-tables.sh line 120: if [[ $? -ne 0 ]]; then ^-- SC2181 (style): Check exit code directly with e.g. 'if ! mycmd;', not indirectly with $?. In tools/tpcds-tools/bin/create-tpcds-tables.sh line 127: if [[ $? -ne 0 ]]; then ^-- SC2181 (style): Check exit code directly with e.g. 'if ! mycmd;', not indirectly with $?. In tools/tpcds-tools/bin/create-tpcds-tables.sh line 134: if [[ $? -ne 0 ]]; then ^-- SC2181 (style): Check exit code directly with e.g. 'if ! mycmd;', not indirectly with $?. In tools/tpcds-tools/bin/create-tpcds-tables.sh line 141: if [[ $? -ne 0 ]]; then ^-- SC2181 (style): Check exit code directly with e.g. 'if ! mycmd;', not indirectly with $?. In tools/tpcds-tools/bin/create-tpcds-tables.sh line 151: if [[ $? -ne 0 ]]; then ^-- SC2181 (style): Check exit code directly with e.g. 'if ! mycmd;', not indirectly with $?. In tools/tpcds-tools/bin/create-tpcds-tables.sh line 157: if [[ $? -ne 0 ]]; then ^-- SC2181 (style): Check exit code directly with e.g. 'if ! mycmd;', not indirectly with $?. In tools/tpcds-tools/bin/create-tpcds-tables.sh line 163: if [[ $? -ne 0 ]]; then ^-- SC2181 (style): Check exit code directly with e.g. 'if ! mycmd;', not indirectly with $?. In tools/tpch-tools/bin/run-tpch-queries.sh line 184: if [[ $? -ne 0 ]]; then ^-- SC2181 (style): Check exit code directly with e.g. 'if ! mycmd;', not indirectly with $?. In tools/tpch-tools/bin/run-tpch-queries.sh line 194: if [[ $? -ne 0 ]]; then ^-- SC2181 (style): Check exit code directly with e.g. 'if ! mycmd;', not indirectly with $?. In tools/tpch-tools/bin/run-tpch-queries.sh line 204: if [[ $? -ne 0 ]]; then ^-- SC2181 (style): Check exit code directly with e.g. 'if ! mycmd;', not indirectly with $?. For more information: https://www.shellcheck.net/wiki/SC2145 -- Argument mixes string and array. ... https://www.shellcheck.net/wiki/SC2181 -- Check exit code directly with e.g... ---------- 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: ---------- --- tools/tpcds-tools/bin/run-tpcds-queries.sh.orig +++ tools/tpcds-tools/bin/run-tpcds-queries.sh @@ -193,8 +193,8 @@ echo -ne "query${i}\t" | tee -a result.csv start=$(date +%s%3N) if ! mysql -h"${FE_HOST}" -u"${USER}" -P"${FE_QUERY_PORT}" -D"${DB}" --comments \ - <"${TPCDS_QUERIES_DIR}/query${i}.sql" \ - >"${RESULT_DIR}/result${i}.out" 2>"${RESULT_DIR}/result${i}.log"; then + <"${TPCDS_QUERIES_DIR}/query${i}.sql" \ + >"${RESULT_DIR}/result${i}.out" 2>"${RESULT_DIR}/result${i}.log"; then echo "Error: Failed to execute query q${i} (cold run). Check the log: ${RESULT_DIR}/result${i}.log" >&2 continue fi @@ -204,8 +204,8 @@ start=$(date +%s%3N) if ! mysql -h"${FE_HOST}" -u"${USER}" -P"${FE_QUERY_PORT}" -D"${DB}" --comments \ - <"${TPCDS_QUERIES_DIR}/query${i}.sql" \ - >"${RESULT_DIR}/result${i}.out" 2>"${RESULT_DIR}/result${i}.log"; then + <"${TPCDS_QUERIES_DIR}/query${i}.sql" \ + >"${RESULT_DIR}/result${i}.out" 2>"${RESULT_DIR}/result${i}.log"; then echo "Error: Failed to execute query q${i} (hot run 1). Check the log: ${RESULT_DIR}/result${i}.log" >&2 continue fi @@ -215,8 +215,8 @@ start=$(date +%s%3N) if ! mysql -h"${FE_HOST}" -u"${USER}" -P"${FE_QUERY_PORT}" -D"${DB}" --comments \ - <"${TPCDS_QUERIES_DIR}/query${i}.sql" \ - >"${RESULT_DIR}/result${i}.out" 2>"${RESULT_DIR}/result${i}.log"; then + <"${TPCDS_QUERIES_DIR}/query${i}.sql" \ + >"${RESULT_DIR}/result${i}.out" 2>"${RESULT_DIR}/result${i}.log"; then echo "Error: Failed to execute query q${i} (hot run 2). Check the log: ${RESULT_DIR}/result${i}.log" >&2 continue fi --- tools/tpch-tools/bin/create-tpch-tables.sh.orig +++ tools/tpch-tools/bin/create-tpch-tables.sh @@ -104,7 +104,7 @@ echo "SF: ${SCALE_FACTOR}" if ! mysql -h"${FE_HOST}" -u"${USER}" -P"${FE_QUERY_PORT}" \ - -e "CREATE DATABASE IF NOT EXISTS ${DB}" 2>&1; then + -e "CREATE DATABASE IF NOT EXISTS ${DB}" 2>&1; then echo "Error: Failed to create database '${DB}'." >&2 exit 1 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: commits-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org