github-actions[bot] commented on PR #42445: URL: https://github.com/apache/doris/pull/42445#issuecomment-2470936039
#### `sh-checker report` To get the full details, please check in the [job]("https://github.com/apache/doris/actions/runs/11801106371") output. <details> <summary>shellcheck errors</summary> ``` 'shellcheck ' returned error 1 finding the following syntactical issues: ---------- In tools/tpcds-tools/bin/run-tpcds-queries.sh line 141: if [ $grep_status -eq 2 ]; then ^--------------------^ SC2292 (style): Prefer [[ ]] over [ ] for tests in Bash/Ksh. ^----------^ SC2248 (style): Prefer double quoting even when variables don't contain special characters. ^----------^ SC2250 (style): Prefer putting braces around variable references even when not strictly required. Did you mean: if [[ "${grep_status}" -eq 2 ]]; then In tools/tpcds-tools/bin/run-tpcds-queries.sh line 143: printf "Error: grep command failed with status %d while processing SQL output for variable '%s'.\n" "$grep_status" "$k" >&2 ^----------^ SC2250 (style): Prefer putting braces around variable references even when not strictly required. ^-- SC2250 (style): Prefer putting braces around variable references even when not strictly required. Did you mean: printf "Error: grep command failed with status %d while processing SQL output for variable '%s'.\n" "${grep_status}" "${k}" >&2 In tools/tpcds-tools/bin/run-tpcds-queries.sh line 145: elif [ $grep_status -eq 1 ]; then ^--------------------^ SC2292 (style): Prefer [[ ]] over [ ] for tests in Bash/Ksh. ^----------^ SC2248 (style): Prefer double quoting even when variables don't contain special characters. ^----------^ SC2250 (style): Prefer putting braces around variable references even when not strictly required. Did you mean: elif [[ "${grep_status}" -eq 1 ]]; then In tools/tpcds-tools/bin/run-tpcds-queries.sh line 146: printf "Warning: No match for 'Value: ' found in the output of the query for variable '%s'.\n" "$k" >&2 ^-- SC2250 (style): Prefer putting braces around variable references even when not strictly required. Did you mean: printf "Warning: No match for 'Value: ' found in the output of the query for variable '%s'.\n" "${k}" >&2 In tools/tpcds-tools/bin/run-tpcds-queries.sh line 153: printf "Error: awk command failed while processing the grep output for variable '%s'.\n" "$k" >&2 ^-- SC2250 (style): Prefer putting braces around variable references even when not strictly required. Did you mean: printf "Error: awk command failed while processing the grep output for variable '%s'.\n" "${k}" >&2 In tools/tpcds-tools/bin/run-tpcds-queries.sh line 158: printf "Warning: No value found for variable '%s'. The 'Value:' might be missing or empty.\n" "$k" >&2 ^-- SC2250 (style): Prefer putting braces around variable references even when not strictly required. Did you mean: printf "Warning: No value found for variable '%s'. The 'Value:' might be missing or empty.\n" "${k}" >&2 In tools/tpch-tools/bin/run-tpch-queries.sh line 137: if [ $grep_status -eq 2 ]; then ^--------------------^ SC2292 (style): Prefer [[ ]] over [ ] for tests in Bash/Ksh. ^----------^ SC2248 (style): Prefer double quoting even when variables don't contain special characters. ^----------^ SC2250 (style): Prefer putting braces around variable references even when not strictly required. Did you mean: if [[ "${grep_status}" -eq 2 ]]; then In tools/tpch-tools/bin/run-tpch-queries.sh line 139: printf "Error: grep command failed with status %d while processing SQL output for variable '%s'.\n" "$grep_status" "$k" >&2 ^----------^ SC2250 (style): Prefer putting braces around variable references even when not strictly required. ^-- SC2250 (style): Prefer putting braces around variable references even when not strictly required. Did you mean: printf "Error: grep command failed with status %d while processing SQL output for variable '%s'.\n" "${grep_status}" "${k}" >&2 In tools/tpch-tools/bin/run-tpch-queries.sh line 141: elif [ $grep_status -eq 1 ]; then ^--------------------^ SC2292 (style): Prefer [[ ]] over [ ] for tests in Bash/Ksh. ^----------^ SC2248 (style): Prefer double quoting even when variables don't contain special characters. ^----------^ SC2250 (style): Prefer putting braces around variable references even when not strictly required. Did you mean: elif [[ "${grep_status}" -eq 1 ]]; then In tools/tpch-tools/bin/run-tpch-queries.sh line 142: printf "Warning: No match for 'Value: ' found in the output of the query for variable '%s'.\n" "$k" >&2 ^-- SC2250 (style): Prefer putting braces around variable references even when not strictly required. Did you mean: printf "Warning: No match for 'Value: ' found in the output of the query for variable '%s'.\n" "${k}" >&2 In tools/tpch-tools/bin/run-tpch-queries.sh line 149: printf "Error: awk command failed while processing the grep output for variable '%s'.\n" "$k" >&2 ^-- SC2250 (style): Prefer putting braces around variable references even when not strictly required. Did you mean: printf "Error: awk command failed while processing the grep output for variable '%s'.\n" "${k}" >&2 In tools/tpch-tools/bin/run-tpch-queries.sh line 154: printf "Warning: No value found for variable '%s'. The 'Value:' might be missing or empty.\n" "$k" >&2 ^-- SC2250 (style): Prefer putting braces around variable references even when not strictly required. Did you mean: printf "Warning: No value found for variable '%s'. The 'Value:' might be missing or empty.\n" "${k}" >&2 For more information: https://www.shellcheck.net/wiki/SC2248 -- Prefer double quoting even when v... https://www.shellcheck.net/wiki/SC2250 -- Prefer putting braces around vari... https://www.shellcheck.net/wiki/SC2292 -- Prefer [[ ]] over [ ] for tests i... ---------- 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 @@ -137,7 +137,7 @@ if ! grep_output=$(grep " Value: " <<<"${output}" 2>&1); then grep_status=$? - + if [ $grep_status -eq 2 ]; then printf "%s\n" "${grep_output}" >&2 printf "Error: grep command failed with status %d while processing SQL output for variable '%s'.\n" "$grep_status" "$k" >&2 ---------- 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