github-actions[bot] commented on PR #39662:
URL: https://github.com/apache/doris/pull/39662#issuecomment-2300090070
#### `sh-checker report`
To get the full details, please check in the
[job]("https://github.com/apache/doris/actions/runs/10482013889") 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 140:
>"${backup_session_variables_file}"
^-- SC2188 (warning): This redirection doesn't have a command. Move
to its command (or use 'true' as no-op).
In tools/tpcds-tools/bin/run-tpcds-queries.sh line 145:
[[ -z "$line" || "$line" =~ ^\s*# ]] && continue
^---^ 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:
[[ -z "${line}" || "${line}" =~ ^\s*# ]] && continue
For more information:
https://www.shellcheck.net/wiki/SC2188 -- This redirection doesn't have a
c...
https://www.shellcheck.net/wiki/SC2250 -- Prefer putting braces around
vari...
----------
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
@@ -131,39 +131,39 @@
backup_session_variables_file="${CURDIR}/../conf/opt/backup_session_variables.sql"
backup_session_variables() {
- if [[ -z "${backup_session_variables_file}" ]] || [[ -z
"${TPCDS_OPT_CONF}" ]]; then
- echo "Error: backup_session_variables_file or TPCDS_OPT_CONF is
not set."
- return 1
- fi
+ if [[ -z "${backup_session_variables_file}" ]] || [[ -z
"${TPCDS_OPT_CONF}" ]]; then
+ echo "Error: backup_session_variables_file or TPCDS_OPT_CONF is not
set."
+ return 1
+ fi
- # Create or clear the backup file
- >"${backup_session_variables_file}"
+ # Create or clear the backup file
+ >"${backup_session_variables_file}"
- # Process each line from the configuration file
- while IFS= read -r line; do
- # Skip empty lines and lines starting with #
- [[ -z "$line" || "$line" =~ ^\s*# ]] && continue
+ # Process each line from the configuration file
+ while IFS= read -r line; do
+ # Skip empty lines and lines starting with #
+ [[ -z "$line" || "$line" =~ ^\s*# ]] && continue
- # Remove 'set global ' and extract variable name
- k="${line/set global /}"
- k="${k%=*}"
+ # Remove 'set global ' and extract variable name
+ k="${line/set global /}"
+ k="${k%=*}"
- # Get session variable value
- v=$(get_session_variable "${k}")
+ # Get session variable value
+ v=$(get_session_variable "${k}")
- # Check if value is empty or not
- if [[ -z "${v}" ]]; then
- echo "Warning: Variable '${k}' does not have a value."
- continue
- fi
+ # Check if value is empty or not
+ if [[ -z "${v}" ]]; then
+ echo "Warning: Variable '${k}' does not have a value."
+ continue
+ fi
- # Ensure value is properly escaped (simple escaping shown here)
- v=$(printf '%s' "${v}" | sed "s/'/\\'/g")
+ # Ensure value is properly escaped (simple escaping shown here)
+ v=$(printf '%s' "${v}" | sed "s/'/\\'/g")
- # Append to the backup file
- echo "set global ${k}='${v}';"
>>"${backup_session_variables_file}"
+ # Append to the backup file
+ echo "set global ${k}='${v}';" >>"${backup_session_variables_file}"
- done <"${TPCDS_OPT_CONF}"
+ done <"${TPCDS_OPT_CONF}"
}
clean_up() {
echo "restore session variables:"
----------
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]