github-actions[bot] commented on PR #43906:
URL: https://github.com/apache/doris/pull/43906#issuecomment-2473677209

   #### `sh-checker report`
   
   To get the full details, please check in the 
[job]("https://github.com/apache/doris/actions/runs/11818636696";) output.
   
   <details>
   <summary>shellcheck errors</summary>
   
   ```
   
   'shellcheck ' returned error 1 finding the following syntactical issues:
   
   ----------
   
   In build-for-release-selectdb-cloud.sh line 124:
       cp output/audit_loader/auditloader.zip ${audit_plugin_path}
                                              ^------------------^ SC2248 
(style): Prefer double quoting even when variables don't contain special 
characters.
   
   Did you mean: 
       cp output/audit_loader/auditloader.zip "${audit_plugin_path}"
   
   
   In build-for-release-selectdb-cloud.sh line 127:
       wget --no-check-certificate -q 
https://apache-doris-releases.oss-cn-beijing.aliyuncs.com/doris-plugins/doris-2.0.13-auditloader.zip
 -O ${audit_plugin_path}
                                                                                
                                                              
^------------------^ SC2248 (style): Prefer double quoting even when variables 
don't contain special characters.
   
   Did you mean: 
       wget --no-check-certificate -q 
https://apache-doris-releases.oss-cn-beijing.aliyuncs.com/doris-plugins/doris-2.0.13-auditloader.zip
 -O "${audit_plugin_path}"
   
   
   In build.sh line 684:
       mkdir -p ${JDBC_DRIVERS_DIR}
                ^-----------------^ SC2086 (info): Double quote to prevent 
globbing and word splitting.
   
   Did you mean: 
       mkdir -p "${JDBC_DRIVERS_DIR}"
   
   
   In build.sh line 713:
                   if md5sum_func ${driver_path} ${dirver_md5}; then
                                  ^------------^ SC2086 (info): Double quote to 
prevent globbing and word splitting.
                                                 ^-----------^ SC2086 (info): 
Double quote to prevent globbing and word splitting.
   
   Did you mean: 
                   if md5sum_func "${driver_path}" "${dirver_md5}"; then
   
   
   In build.sh line 723:
                        if md5sum_func ${driver_path} ${dirver_md5}; then
                                       ^------------^ SC2086 (info): Double 
quote to prevent globbing and word splitting.
                                                      ^-----------^ SC2086 
(info): Double quote to prevent globbing and word splitting.
   
   Did you mean: 
                        if md5sum_func "${driver_path}" "${dirver_md5}"; then
   
   
   In build.sh line 744:
   if [[ "x${BUILD_JDBC_DRIVER}" = "xON" ]]; then
         ^---------------------^ SC2268 (style): Avoid x-prefix in comparisons 
as it no longer serves a purpose.
   
   Did you mean: 
   if [[ "${BUILD_JDBC_DRIVER}" = "ON" ]]; then
   
   
   In build.sh line 836:
       if [[ "x${BUILD_JDBC_DRIVER}" = "xON" ]]; then
             ^---------------------^ SC2268 (style): Avoid x-prefix in 
comparisons as it no longer serves a purpose.
   
   Did you mean: 
       if [[ "${BUILD_JDBC_DRIVER}" = "ON" ]]; then
   
   
   In build.sh line 961:
       if [[ "x${BUILD_JDBC_DRIVER}" = "xON" ]]; then
             ^---------------------^ SC2268 (style): Avoid x-prefix in 
comparisons as it no longer serves a purpose.
   
   Did you mean: 
       if [[ "${BUILD_JDBC_DRIVER}" = "ON" ]]; then
   
   
   In gen_smoke_test.sh line 8:
   ./run-regression-test.sh --clean --run -h 2>&1 > /dev/null
                                             ^--^ SC2069 (warning): To redirect 
stdout+stderr, 2>&1 must be last (or use '{ cmd > file; } 2>&1' to clarify).
   
   
   In gen_smoke_test.sh line 12:
   if [ -d ./smoke_test ];then
      ^-----------------^ SC2292 (style): Prefer [[ ]] over [ ] for tests in 
Bash/Ksh.
   
   Did you mean: 
   if [[ -d ./smoke_test ]];then
   
   
   In gen_smoke_test.sh line 194:
   if [ "$SYSTEM" = "Darwin" ]; then
      ^----------------------^ SC2292 (style): Prefer [[ ]] over [ ] for tests 
in Bash/Ksh.
         ^-----^ SC2250 (style): Prefer putting braces around variable 
references even when not strictly required.
   
   Did you mean: 
   if [[ "${SYSTEM}" = "Darwin" ]]; then
   
   
   In gen_smoke_test.sh line 199:
   begin=`sed -n '/# set maven/=' ./bin/run-regression-test.sh`
         ^-- SC2006 (style): Use $(...) notation instead of legacy backticks 
`...`.
   
   Did you mean: 
   begin=$(sed -n '/# set maven/=' ./bin/run-regression-test.sh)
   
   
   In gen_smoke_test.sh line 200:
   end=`sed -n '/export MVN_CMD/=' ./bin/run-regression-test.sh`
       ^-- SC2006 (style): Use $(...) notation instead of legacy backticks 
`...`.
   
   Did you mean: 
   end=$(sed -n '/export MVN_CMD/=' ./bin/run-regression-test.sh)
   
   
   In gen_smoke_test.sh line 201:
   sed -i $SEDOPT "$begin,$end"'d' ./bin/run-regression-test.sh
          ^-----^ SC2086 (info): Double quote to prevent globbing and word 
splitting.
          ^-----^ 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.
                          ^--^ SC2250 (style): Prefer putting braces around 
variable references even when not strictly required.
   
   Did you mean: 
   sed -i "${SEDOPT}" "${begin},${end}"'d' ./bin/run-regression-test.sh
   
   
   In gensrc/script/gen_build_version.sh line 38:
   if [[ ${build_version_hotfix} > 0 ]]; then
                                 ^-- SC2071 (error): > is for string 
comparisons. Use -gt instead.
   
   
   In gensrc/script/gen_build_version.sh line 227:
   if [[ ${build_version_hotfix} > 0 ]]; then
                                 ^-- SC2071 (error): > is for string 
comparisons. Use -gt instead.
   
   For more information:
     https://www.shellcheck.net/wiki/SC2071 -- > is for string comparisons. Use 
...
     https://www.shellcheck.net/wiki/SC2069 -- To redirect stdout+stderr, 2>&1 
m...
     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:
   
   ----------
   --- build-for-release-selectdb-cloud.sh.orig
   +++ build-for-release-selectdb-cloud.sh
   @@ -41,20 +41,20 @@
        mkdir -p "${JDBC_DRIVERS_DIR}"
    
        # jar names and md5sum
   -    local driver_array=( \
   -    "clickhouse-jdbc-0.3.2-patch11-all.jar 
9be22a93267dc4b066e0a3aefc2dd024" \
   -    "clickhouse-jdbc-0.4.2-all.jar         
45d7c4b5d17a8d7ac81b9e6200b78adb" \
   -    "mssql-jdbc-11.2.0.jre8.jar            
b204274eb02a848ac405961e6f43e7bd" \
   -    "mssql-jdbc-11.2.3.jre8.jar            
5d53b0cb64ec2e5268a5f7a349889d35" \
   -    "mysql-connector-java-8.0.25.jar       
fdf55dcef04b09f2eaf42b75e61ccc9a" \
   -    "ojdbc6.jar                            
621a393d7be9ff0f2fec6fbba2c8f9b6" \
   -    "ojdbc8.jar                            
21dd8c3d05648be958184f5e9288f69e" \
   -    "postgresql-42.5.0.jar                 
20c8228267b6c9ce620fddb39467d3eb" \
   -    "postgresql-42.5.1.jar                 
378f8a2ddab2564a281e5f852800e2e9" \
   +    local driver_array=(
   +        "clickhouse-jdbc-0.3.2-patch11-all.jar 
9be22a93267dc4b066e0a3aefc2dd024"
   +        "clickhouse-jdbc-0.4.2-all.jar         
45d7c4b5d17a8d7ac81b9e6200b78adb"
   +        "mssql-jdbc-11.2.0.jre8.jar            
b204274eb02a848ac405961e6f43e7bd"
   +        "mssql-jdbc-11.2.3.jre8.jar            
5d53b0cb64ec2e5268a5f7a349889d35"
   +        "mysql-connector-java-8.0.25.jar       
fdf55dcef04b09f2eaf42b75e61ccc9a"
   +        "ojdbc6.jar                            
621a393d7be9ff0f2fec6fbba2c8f9b6"
   +        "ojdbc8.jar                            
21dd8c3d05648be958184f5e9288f69e"
   +        "postgresql-42.5.0.jar                 
20c8228267b6c9ce620fddb39467d3eb"
   +        "postgresql-42.5.1.jar                 
378f8a2ddab2564a281e5f852800e2e9"
        )
    
        local i=0
   -    for ((i=0; i<${#driver_array[@]}; i++)); do
   +    for ((i = 0; i < ${#driver_array[@]}; i++)); do
            local driver
            local driver_md5
            driver=$(echo "${driver_array[i]}" | awk '{print $1}')
   @@ -80,7 +80,7 @@
                else
                    echo "Downloading ${driver} from ${driver_url} to 
${driver_path}"
                    if wget --no-check-certificate -q "${driver_url}" -O 
"${driver_path}"; then
   -                     if md5sum_func "${driver_path}" "${driver_md5}"; then
   +                    if md5sum_func "${driver_path}" "${driver_md5}"; then
                            status=0
                            echo "Success to download ${driver}"
                            break
   @@ -100,7 +100,6 @@
        done
    }
    
   -
    # build and copy jdbc drivers
    BUILD_JDBC_DRIVER=${BUILD_JDBC_DRIVER:-"ON"}
    if [[ "${BUILD_JDBC_DRIVER}" = "ON" ]]; then
   --- build.sh.orig
   +++ build.sh
   @@ -683,22 +683,22 @@
        JDBC_DRIVERS_DIR="${DORIS_THIRDPARTY}/src/jdbc_drivers/"
        mkdir -p ${JDBC_DRIVERS_DIR}
    
   -    local driver_array=(\
   -    clickhouse-jdbc-0.3.2-patch11-all.jar \
   -    mssql-jdbc-11.2.0.jre8.jar \
   -    mysql-connector-java-8.0.25.jar \
   -    ojdbc6.jar \
   -    postgresql-42.5.0.jar)
   +    local driver_array=(
   +        clickhouse-jdbc-0.3.2-patch11-all.jar
   +        mssql-jdbc-11.2.0.jre8.jar
   +        mysql-connector-java-8.0.25.jar
   +        ojdbc6.jar
   +        postgresql-42.5.0.jar)
    
   -    local driver_md5_array=(\
   -    9be22a93267dc4b066e0a3aefc2dd024 \
   -    b204274eb02a848ac405961e6f43e7bd \
   -    fdf55dcef04b09f2eaf42b75e61ccc9a \
   -    621a393d7be9ff0f2fec6fbba2c8f9b6 \
   -    20c8228267b6c9ce620fddb39467d3eb)
   +    local driver_md5_array=(
   +        9be22a93267dc4b066e0a3aefc2dd024
   +        b204274eb02a848ac405961e6f43e7bd
   +        fdf55dcef04b09f2eaf42b75e61ccc9a
   +        621a393d7be9ff0f2fec6fbba2c8f9b6
   +        20c8228267b6c9ce620fddb39467d3eb)
    
        local i=0
   -    for ((i=0; i<${#driver_array[@]}; i++)); do
   +    for ((i = 0; i < ${#driver_array[@]}; i++)); do
            local driver="${driver_array[i]}"
            local dirver_md5=${driver_md5_array[${i}]}
    
   @@ -720,7 +720,7 @@
                else
                    echo "Downloading ${driver} from ${driver_url} to 
${driver_path}"
                    if wget --no-check-certificate -q "${driver_url}" -O 
"${driver_path}"; then
   -                     if md5sum_func ${driver_path} ${dirver_md5}; then
   +                    if md5sum_func ${driver_path} ${dirver_md5}; then
                            status=0
                            echo "Success to download ${driver}"
                            break
   --- gen_smoke_test.sh.orig
   +++ gen_smoke_test.sh
   @@ -5,11 +5,11 @@
    # just build java lib, ignore run case
    echo "You need correct configuration JAVA_HOME(export). Under normal 
conditions, You will see 'done' when finish it"
    echo "build smoke test ..."
   -./run-regression-test.sh --clean --run -h 2>&1 > /dev/null
   +./run-regression-test.sh --clean --run -h 2>&1 >/dev/null
    
    echo "mkdir smoke_test dir ..."
    # generate smoke-test framework
   -if [ -d ./smoke_test ];then
   +if [ -d ./smoke_test ]; then
        rm -fr ./smoke_test
    fi
    
   @@ -18,7 +18,7 @@
    
    echo "genrate script ..."
    # generate start.sh
   -cat>start.sh<<EOF
   +cat >start.sh <<EOF
    #!/bin/sh
    
    echo "You need put smoke-test/tpch/sf0.1/customer.tbl.gz on S3 first"
   @@ -150,7 +150,7 @@
    chmod +x start.sh
    
    # generate smoke.conf
   -cat>smoke.conf<<EOF
   +cat >smoke.conf <<EOF
    
JAVA_HOME=/Users/dengxin/Library/Java/JavaVirtualMachines/semeru-16.0.2/Contents/Home
    #smoke env 
    smokeEnv="dx-smoke-test"
   @@ -195,9 +195,8 @@
        SEDOPT=".bak"
    fi
    
   -
   -begin=`sed -n '/# set maven/=' ./bin/run-regression-test.sh`
   -end=`sed -n '/export MVN_CMD/=' ./bin/run-regression-test.sh`
   +begin=$(sed -n '/# set maven/=' ./bin/run-regression-test.sh)
   +end=$(sed -n '/export MVN_CMD/=' ./bin/run-regression-test.sh)
    sed -i $SEDOPT "$begin,$end"'d' ./bin/run-regression-test.sh
    
    cd ..
   ----------
   
   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]

Reply via email to