github-actions[bot] commented on PR #20903: URL: https://github.com/apache/doris/pull/20903#issuecomment-1594285357
#### `sh-checker report` To get the full details, please check in the [job]("https://github.com/apache/doris/actions/runs/5287682041") output. <details> <summary>shellcheck errors</summary> ``` 'shellcheck ' returned error 1 finding the following syntactical issues: ---------- In tools/tpcds-tools/bin/create-tpcds-tables.sh line 80: if [[ ${SCALE_FACTOR} -ne 1 ]] && [[ ${SCALE_FACTOR} -ne 100]]; then ^-- SC1009 (info): The mentioned syntax error was in this if expression. ^-- SC1073 (error): Couldn't parse this test expression. Fix to allow more checks. ^-- SC1020 (error): You need a space before the ]]. ^-- SC1072 (error): Missing space before ]. Fix any mentioned problems and try again. In tools/tpcds-tools/bin/run-tpcds-queries.sh line 135: mysql -h${FE_HOST} -u${USER} -P${FE_QUERY_PORT} < ${TPCDS_QUERIES_DIR}/query${i}.sql > ${RESULT_DIR}/result${i}.out 2>${RESULT_DIR}/result${i}.log ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--------------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^------------------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^-----------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^-----------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: mysql -h"${FE_HOST}" -u"${USER}" -P"${FE_QUERY_PORT}" < "${TPCDS_QUERIES_DIR}"/query"${i}".sql > "${RESULT_DIR}"/result"${i}".out 2>"${RESULT_DIR}"/result"${i}".log In tools/tpcds-tools/bin/run-tpcds-queries.sh line 141: mysql -h${FE_HOST} -u${USER} -P${FE_QUERY_PORT} < ${TPCDS_QUERIES_DIR}/query${i}.sql > ${RESULT_DIR}/result${i}.out 2>${RESULT_DIR}/result${i}.log ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--------------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^------------------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^-----------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^-----------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: mysql -h"${FE_HOST}" -u"${USER}" -P"${FE_QUERY_PORT}" < "${TPCDS_QUERIES_DIR}"/query"${i}".sql > "${RESULT_DIR}"/result"${i}".out 2>"${RESULT_DIR}"/result"${i}".log In tools/tpcds-tools/bin/run-tpcds-queries.sh line 147: mysql -h${FE_HOST} -u${USER} -P${FE_QUERY_PORT} < ${TPCDS_QUERIES_DIR}/query${i}.sql > ${RESULT_DIR}/result${i}.out 2>${RESULT_DIR}/result${i}.log ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--------------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^------------------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^-----------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^-----------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: mysql -h"${FE_HOST}" -u"${USER}" -P"${FE_QUERY_PORT}" < "${TPCDS_QUERIES_DIR}"/query"${i}".sql > "${RESULT_DIR}"/result"${i}".out 2>"${RESULT_DIR}"/result"${i}".log In tools/tpcds-tools/bin/run-tpcds-queries.sh line 168: find "${RESULT_DIR}" -name "*.log" -type f -size 0c | xargs -n 1 rm -f ^-- SC2038 (warning): Use -print0/-0 or -exec + to allow for non-alphanumeric filenames. In tools/tpcds-tools/bin/run-tpcds-queries.sh line 170: ls ${RESULT_DIR}/*.log ^-----------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ls "${RESULT_DIR}"/*.log For more information: https://www.shellcheck.net/wiki/SC1020 -- You need a space before the ]]. https://www.shellcheck.net/wiki/SC2038 -- Use -print0/-0 or -exec + to allo... 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: ---------- tools/tpcds-tools/bin/create-tpcds-tables.sh:80:63: not a valid test operator: ; --- tools/tpcds-tools/bin/run-tpcds-queries.sh.orig +++ tools/tpcds-tools/bin/run-tpcds-queries.sh @@ -59,9 +59,9 @@ shift ;; -s) - SCALE_FACTOR=$2 - shift 2 - ;; + SCALE_FACTOR=$2 + shift 2 + ;; --) shift break @@ -78,11 +78,11 @@ fi if [[ ${SCALE_FACTOR} -eq 1 ]]; then - echo "Running tpcds sf 1 queries" - TPCDS_QUERIES_DIR="${CURDIR}/../queries_1" + echo "Running tpcds sf 1 queries" + TPCDS_QUERIES_DIR="${CURDIR}/../queries_1" elif [[ ${SCALE_FACTOR} -eq 100 ]]; then - echo "Running tpcds sf 100 queries" - TPCDS_QUERIES_DIR="${CURDIR}/../queries_100" + echo "Running tpcds sf 100 queries" + TPCDS_QUERIES_DIR="${CURDIR}/../queries_100" fi check_prerequest() { @@ -132,19 +132,19 @@ hot2=0 echo -ne "query${i}\t" | tee -a result.csv start=$(date +%s%3N) - mysql -h${FE_HOST} -u${USER} -P${FE_QUERY_PORT} < ${TPCDS_QUERIES_DIR}/query${i}.sql > ${RESULT_DIR}/result${i}.out 2>${RESULT_DIR}/result${i}.log + mysql -h${FE_HOST} -u${USER} -P${FE_QUERY_PORT} <${TPCDS_QUERIES_DIR}/query${i}.sql >${RESULT_DIR}/result${i}.out 2>${RESULT_DIR}/result${i}.log end=$(date +%s%3N) cold=$((end - start)) echo -ne "${cold}\t" | tee -a result.csv start=$(date +%s%3N) - mysql -h${FE_HOST} -u${USER} -P${FE_QUERY_PORT} < ${TPCDS_QUERIES_DIR}/query${i}.sql > ${RESULT_DIR}/result${i}.out 2>${RESULT_DIR}/result${i}.log + mysql -h${FE_HOST} -u${USER} -P${FE_QUERY_PORT} <${TPCDS_QUERIES_DIR}/query${i}.sql >${RESULT_DIR}/result${i}.out 2>${RESULT_DIR}/result${i}.log end=$(date +%s%3N) hot1=$((end - start)) echo -ne "${hot1}\t" | tee -a result.csv start=$(date +%s%3N) - mysql -h${FE_HOST} -u${USER} -P${FE_QUERY_PORT} < ${TPCDS_QUERIES_DIR}/query${i}.sql > ${RESULT_DIR}/result${i}.out 2>${RESULT_DIR}/result${i}.log + mysql -h${FE_HOST} -u${USER} -P${FE_QUERY_PORT} <${TPCDS_QUERIES_DIR}/query${i}.sql >${RESULT_DIR}/result${i}.out 2>${RESULT_DIR}/result${i}.log end=$(date +%s%3N) hot2=$((end - start)) echo -ne "${hot2}\t" | tee -a result.csv ---------- 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