github-actions[bot] commented on PR #31126:
URL: https://github.com/apache/doris/pull/31126#issuecomment-1952379952
#### `sh-checker report`
To get the full details, please check in the
[job]("https://github.com/apache/doris/actions/runs/7959749211") output.
<details>
<summary>shellcheck errors</summary>
```
'shellcheck ' returned error 1 finding the following syntactical issues:
----------
In tools/ssb-tools/bin/load-ssb-data.sh line 45:
$0 -x blabla use transaction id "blabla".
^----^ SC2140 (warning): Word is of
the form "A"B"C" (B indicated). Did you mean "ABC" or "A\"B\"C"?
In tools/ssb-tools/bin/load-ssb-data.sh line 123:
flat_con_idx=$(($flat_con_idx+1))
^-----------^ SC2004 (style): $/${} is unnecessary
on arithmetic variables.
^-----------^ SC2250 (style): Prefer putting braces
around variable references even when not strictly required.
Did you mean:
flat_con_idx=$((${flat_con_idx}+1))
In tools/ssb-tools/bin/load-ssb-data.sh line 125:
if [[ -z $TXN_ID ]]; then
^-----^ SC2250 (style): Prefer putting braces around
variable references even when not strictly required.
Did you mean:
if [[ -z ${TXN_ID} ]]; then
In tools/ssb-tools/bin/load-ssb-data.sh line 287:
if [[ -z $TXN_ID ]]; then
^-----^ SC2250 (style): Prefer putting braces around variable
references even when not strictly required.
Did you mean:
if [[ -z ${TXN_ID} ]]; then
In tools/ssb-tools/bin/load-ssb-data.sh line 300:
if [[ -z $TXN_ID ]]; then
^-----^ SC2250 (style): Prefer putting braces around variable
references even when not strictly required.
Did you mean:
if [[ -z ${TXN_ID} ]]; then
In tools/ssb-tools/bin/load-ssb-data.sh line 313:
if [[ -z $TXN_ID ]]; then
^-----^ SC2250 (style): Prefer putting braces around variable
references even when not strictly required.
Did you mean:
if [[ -z ${TXN_ID} ]]; then
In tools/ssb-tools/bin/load-ssb-data.sh line 326:
if [[ -z $TXN_ID ]]; then
^-----^ SC2250 (style): Prefer putting braces around variable
references even when not strictly required.
Did you mean:
if [[ -z ${TXN_ID} ]]; then
In tools/ssb-tools/bin/load-ssb-data.sh line 341:
local FILE_ID=$(echo "$@" | sed 's/.*\.//')
^-----^ SC2155 (warning): Declare and assign separately to avoid
masking return values.
^------------------------^ SC2001 (style): See if you
can use ${variable//search/replace} instead.
In tools/ssb-tools/bin/load-ssb-data.sh line 342:
if [[ -z $TXN_ID ]]; then
^-----^ SC2250 (style): Prefer putting braces around variable
references even when not strictly required.
Did you mean:
if [[ -z ${TXN_ID} ]]; then
In tools/tpcds-tools/bin/load-tpcds-data.sh line 44:
$0 -x blabla use transaction id "blabla".
^----^ SC2140 (warning): Word is of
the form "A"B"C" (B indicated). Did you mean "ABC" or "A\"B\"C"?
In tools/tpcds-tools/bin/load-tpcds-data.sh line 181:
if [[ -z $TXN_ID ]]; then
^-----^ SC2250 (style): Prefer putting braces around
variable references even when not strictly required.
Did you mean:
if [[ -z ${TXN_ID} ]]; then
In tools/tpcds-tools/bin/load-tpcds-data.sh line 184:
-u "${USER}":"${PASSWORD:=}" \
^-----------^ SC2030 (info): Modification
of PASSWORD is local (to subshell caused by $(..) expansion).
In tools/tpcds-tools/bin/load-tpcds-data.sh line 188:
http://"${FE_HOST}":"${FE_HTTP_PORT:=8030}"/api/"${DB}"/"${table_name}"/_stream_load
2>/dev/null)
^-------------------^ SC2030
(info): Modification of FE_HTTP_PORT is local (to subshell caused by $(..)
expansion).
In tools/tpcds-tools/bin/load-tpcds-data.sh line 192:
-u "${USER}":"${PASSWORD:=}" \
^-----------^ SC2031 (info): PASSWORD was
modified in a subshell. That change might be lost.
In tools/tpcds-tools/bin/load-tpcds-data.sh line 197:
http://"${FE_HOST}":"${FE_HTTP_PORT:=8030}"/api/"${DB}"/"${table_name}"/_stream_load
2>/dev/null)
^-------------------^ SC2031
(info): FE_HTTP_PORT was modified in a subshell. That change might be lost.
In tools/tpch-tools/bin/load-tpch-data.sh line 45:
$0 -x blabla use transaction id "blabla".
^----^ SC2140 (warning): Word is of
the form "A"B"C" (B indicated). Did you mean "ABC" or "A\"B\"C"?
In tools/tpch-tools/bin/load-tpch-data.sh line 126:
if [[ -z $TXN_ID ]]; then
^-----^ SC2250 (style): Prefer putting braces around variable
references even when not strictly required.
Did you mean:
if [[ -z ${TXN_ID} ]]; then
In tools/tpch-tools/bin/load-tpch-data.sh line 139:
if [[ -z $TXN_ID ]]; then
^-----^ SC2250 (style): Prefer putting braces around variable
references even when not strictly required.
Did you mean:
if [[ -z ${TXN_ID} ]]; then
In tools/tpch-tools/bin/load-tpch-data.sh line 152:
if [[ -z $TXN_ID ]]; then
^-----^ SC2250 (style): Prefer putting braces around variable
references even when not strictly required.
Did you mean:
if [[ -z ${TXN_ID} ]]; then
In tools/tpch-tools/bin/load-tpch-data.sh line 165:
if [[ -z $TXN_ID ]]; then
^-----^ SC2250 (style): Prefer putting braces around variable
references even when not strictly required.
Did you mean:
if [[ -z ${TXN_ID} ]]; then
In tools/tpch-tools/bin/load-tpch-data.sh line 178:
if [[ -z $TXN_ID ]]; then
^-----^ SC2250 (style): Prefer putting braces around variable
references even when not strictly required.
Did you mean:
if [[ -z ${TXN_ID} ]]; then
In tools/tpch-tools/bin/load-tpch-data.sh line 191:
local FILE_ID=$(echo "$@" | sed 's/.*\.//')
^-----^ SC2155 (warning): Declare and assign separately to avoid
masking return values.
^------------------------^ SC2001 (style): See if you
can use ${variable//search/replace} instead.
In tools/tpch-tools/bin/load-tpch-data.sh line 192:
if [[ -z $TXN_ID ]]; then
^-----^ SC2250 (style): Prefer putting braces around variable
references even when not strictly required.
Did you mean:
if [[ -z ${TXN_ID} ]]; then
In tools/tpch-tools/bin/load-tpch-data.sh line 205:
local FILE_ID=$(echo "$@" | sed 's/.*\.//')
^-----^ SC2155 (warning): Declare and assign separately to avoid
masking return values.
^------------------------^ SC2001 (style): See if you
can use ${variable//search/replace} instead.
In tools/tpch-tools/bin/load-tpch-data.sh line 206:
if [[ -z $TXN_ID ]]; then
^-----^ SC2250 (style): Prefer putting braces around variable
references even when not strictly required.
Did you mean:
if [[ -z ${TXN_ID} ]]; then
In tools/tpch-tools/bin/load-tpch-data.sh line 219:
local FILE_ID=$(echo "$@" | sed 's/.*\.//')
^-----^ SC2155 (warning): Declare and assign separately to avoid
masking return values.
^------------------------^ SC2001 (style): See if you
can use ${variable//search/replace} instead.
In tools/tpch-tools/bin/load-tpch-data.sh line 220:
if [[ -z $TXN_ID ]]; then
^-----^ SC2250 (style): Prefer putting braces around variable
references even when not strictly required.
Did you mean:
if [[ -z ${TXN_ID} ]]; then
For more information:
https://www.shellcheck.net/wiki/SC2140 -- Word is of the form "A"B"C" (B
in...
https://www.shellcheck.net/wiki/SC2155 -- Declare and assign separately to
...
https://www.shellcheck.net/wiki/SC2030 -- Modification of FE_HTTP_PORT is
l...
----------
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/ssb-tools/bin/load-ssb-data.sh.orig
+++ tools/ssb-tools/bin/load-ssb-data.sh
@@ -120,7 +120,7 @@
local flat_con_idx=0
for con in 'lo_orderdate<19930101' 'lo_orderdate>=19930101 and
lo_orderdate<19940101' 'lo_orderdate>=19940101 and lo_orderdate<19950101'
'lo_orderdate>=19950101 and lo_orderdate<19960101' 'lo_orderdate>=19960101 and
lo_orderdate<19970101' 'lo_orderdate>=19970101 and lo_orderdate<19980101'
'lo_orderdate>=19980101'; do
echo -e "\n${con}"
- flat_con_idx=$(($flat_con_idx+1))
+ flat_con_idx=$(($flat_con_idx + 1))
if [[ -z $TXN_ID ]]; then
run_sql "
@@ -285,54 +285,54 @@
echo 'Loading data for table: part'
if [[ -z $TXN_ID ]]; then
-curl --location-trusted -u "${USER}":"${PASSWORD}" \
- -H "column_separator:|" \
- -H
"columns:p_partkey,p_name,p_mfgr,p_category,p_brand,p_color,p_type,p_size,p_container,p_dummy"
\
- -T "${SSB_DATA_DIR}"/part.tbl
http://"${FE_HOST}":"${FE_HTTP_PORT}"/api/"${DB}"/part/_stream_load
+ curl --location-trusted -u "${USER}":"${PASSWORD}" \
+ -H "column_separator:|" \
+ -H
"columns:p_partkey,p_name,p_mfgr,p_category,p_brand,p_color,p_type,p_size,p_container,p_dummy"
\
+ -T "${SSB_DATA_DIR}"/part.tbl
http://"${FE_HOST}":"${FE_HTTP_PORT}"/api/"${DB}"/part/_stream_load
else
-curl --location-trusted -u "${USER}":"${PASSWORD}" \
- -H "label:${TXN_ID}_part" -H "column_separator:|" \
- -H
"columns:p_partkey,p_name,p_mfgr,p_category,p_brand,p_color,p_type,p_size,p_container,p_dummy"
\
- -T "${SSB_DATA_DIR}"/part.tbl
http://"${FE_HOST}":"${FE_HTTP_PORT}"/api/"${DB}"/part/_stream_load
+ curl --location-trusted -u "${USER}":"${PASSWORD}" \
+ -H "label:${TXN_ID}_part" -H "column_separator:|" \
+ -H
"columns:p_partkey,p_name,p_mfgr,p_category,p_brand,p_color,p_type,p_size,p_container,p_dummy"
\
+ -T "${SSB_DATA_DIR}"/part.tbl
http://"${FE_HOST}":"${FE_HTTP_PORT}"/api/"${DB}"/part/_stream_load
fi
echo 'Loading data for table: date'
if [[ -z $TXN_ID ]]; then
-curl --location-trusted -u "${USER}":"${PASSWORD}" \
- -H "label:${TXN_ID}_date" -H "column_separator:|" \
- -H
"columns:d_datekey,d_date,d_dayofweek,d_month,d_year,d_yearmonthnum,d_yearmonth,d_daynuminweek,d_daynuminmonth,d_daynuminyear,d_monthnuminyear,d_weeknuminyear,d_sellingseason,d_lastdayinweekfl,d_lastdayinmonthfl,d_holidayfl,d_weekdayfl,d_dummy"
\
- -T "${SSB_DATA_DIR}"/date.tbl
http://"${FE_HOST}":"${FE_HTTP_PORT}"/api/"${DB}"/dates/_stream_load
+ curl --location-trusted -u "${USER}":"${PASSWORD}" \
+ -H "label:${TXN_ID}_date" -H "column_separator:|" \
+ -H
"columns:d_datekey,d_date,d_dayofweek,d_month,d_year,d_yearmonthnum,d_yearmonth,d_daynuminweek,d_daynuminmonth,d_daynuminyear,d_monthnuminyear,d_weeknuminyear,d_sellingseason,d_lastdayinweekfl,d_lastdayinmonthfl,d_holidayfl,d_weekdayfl,d_dummy"
\
+ -T "${SSB_DATA_DIR}"/date.tbl
http://"${FE_HOST}":"${FE_HTTP_PORT}"/api/"${DB}"/dates/_stream_load
else
-curl --location-trusted -u "${USER}":"${PASSWORD}" \
- -H "column_separator:|" \
- -H
"columns:d_datekey,d_date,d_dayofweek,d_month,d_year,d_yearmonthnum,d_yearmonth,d_daynuminweek,d_daynuminmonth,d_daynuminyear,d_monthnuminyear,d_weeknuminyear,d_sellingseason,d_lastdayinweekfl,d_lastdayinmonthfl,d_holidayfl,d_weekdayfl,d_dummy"
\
- -T "${SSB_DATA_DIR}"/date.tbl
http://"${FE_HOST}":"${FE_HTTP_PORT}"/api/"${DB}"/dates/_stream_load
+ curl --location-trusted -u "${USER}":"${PASSWORD}" \
+ -H "column_separator:|" \
+ -H
"columns:d_datekey,d_date,d_dayofweek,d_month,d_year,d_yearmonthnum,d_yearmonth,d_daynuminweek,d_daynuminmonth,d_daynuminyear,d_monthnuminyear,d_weeknuminyear,d_sellingseason,d_lastdayinweekfl,d_lastdayinmonthfl,d_holidayfl,d_weekdayfl,d_dummy"
\
+ -T "${SSB_DATA_DIR}"/date.tbl
http://"${FE_HOST}":"${FE_HTTP_PORT}"/api/"${DB}"/dates/_stream_load
fi
echo 'Loading data for table: supplier'
if [[ -z $TXN_ID ]]; then
-curl --location-trusted -u "${USER}":"${PASSWORD}" \
- -H "column_separator:|" \
- -H
"columns:s_suppkey,s_name,s_address,s_city,s_nation,s_region,s_phone,s_dummy" \
- -T "${SSB_DATA_DIR}"/supplier.tbl
http://"${FE_HOST}":"${FE_HTTP_PORT}"/api/"${DB}"/supplier/_stream_load
+ curl --location-trusted -u "${USER}":"${PASSWORD}" \
+ -H "column_separator:|" \
+ -H
"columns:s_suppkey,s_name,s_address,s_city,s_nation,s_region,s_phone,s_dummy" \
+ -T "${SSB_DATA_DIR}"/supplier.tbl
http://"${FE_HOST}":"${FE_HTTP_PORT}"/api/"${DB}"/supplier/_stream_load
else
-curl --location-trusted -u "${USER}":"${PASSWORD}" \
- -H "label:${TXN_ID}_supplier" -H "column_separator:|" \
- -H
"columns:s_suppkey,s_name,s_address,s_city,s_nation,s_region,s_phone,s_dummy" \
- -T "${SSB_DATA_DIR}"/supplier.tbl
http://"${FE_HOST}":"${FE_HTTP_PORT}"/api/"${DB}"/supplier/_stream_load
+ curl --location-trusted -u "${USER}":"${PASSWORD}" \
+ -H "label:${TXN_ID}_supplier" -H "column_separator:|" \
+ -H
"columns:s_suppkey,s_name,s_address,s_city,s_nation,s_region,s_phone,s_dummy" \
+ -T "${SSB_DATA_DIR}"/supplier.tbl
http://"${FE_HOST}":"${FE_HTTP_PORT}"/api/"${DB}"/supplier/_stream_load
fi
echo 'Loading data for table: customer'
if [[ -z $TXN_ID ]]; then
-curl --location-trusted -u "${USER}":"${PASSWORD}" \
- -H "column_separator:|" \
- -H
"columns:c_custkey,c_name,c_address,c_city,c_nation,c_region,c_phone,c_mktsegment,no_use"
\
- -T "${SSB_DATA_DIR}"/customer.tbl
http://"${FE_HOST}":"${FE_HTTP_PORT}"/api/"${DB}"/customer/_stream_load
+ curl --location-trusted -u "${USER}":"${PASSWORD}" \
+ -H "column_separator:|" \
+ -H
"columns:c_custkey,c_name,c_address,c_city,c_nation,c_region,c_phone,c_mktsegment,no_use"
\
+ -T "${SSB_DATA_DIR}"/customer.tbl
http://"${FE_HOST}":"${FE_HTTP_PORT}"/api/"${DB}"/customer/_stream_load
else
-curl --location-trusted -u "${USER}":"${PASSWORD}" \
- -H "label:${TXN_ID}_customer" -H "column_separator:|" \
- -H
"columns:c_custkey,c_name,c_address,c_city,c_nation,c_region,c_phone,c_mktsegment,no_use"
\
- -T "${SSB_DATA_DIR}"/customer.tbl
http://"${FE_HOST}":"${FE_HTTP_PORT}"/api/"${DB}"/customer/_stream_load
+ curl --location-trusted -u "${USER}":"${PASSWORD}" \
+ -H "label:${TXN_ID}_customer" -H "column_separator:|" \
+ -H
"columns:c_custkey,c_name,c_address,c_city,c_nation,c_region,c_phone,c_mktsegment,no_use"
\
+ -T "${SSB_DATA_DIR}"/customer.tbl
http://"${FE_HOST}":"${FE_HTTP_PORT}"/api/"${DB}"/customer/_stream_load
fi
echo "Loading data for table: lineorder, with ${PARALLEL} parallel"
----------
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]