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

   #### `sh-checker report`
   
   To get the full details, please check in the 
[job]("https://github.com/apache/doris/actions/runs/4712088105";) output.
   
   <details>
   <summary>shellcheck errors</summary>
   
   ```
   
   'shellcheck ' returned error 1 finding the following syntactical issues:
   
   ----------
   
   In dist/download_scripts/1.2.3/download_arm_apache.sh line 21:
   ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd)"
   ^--^ SC2034 (warning): ROOT appears unused. Verify use (or export if used 
externally).
   
   
   In dist/download_scripts/1.2.3/download_arm_apache.sh line 32:
   if [ ! -f "${DOWNLOAD_BASE_SCRIPTS}" ]; then
      ^-- SC2292 (style): Prefer [[ ]] over [ ] for tests in Bash/Ksh.
   
   Did you mean: 
   if [[ ! -f "${DOWNLOAD_BASE_SCRIPTS}" ]]; then
   
   
   In dist/download_scripts/1.2.3/download_arm_apache.sh line 34:
           && chmod a+x ${DOWNLOAD_BASE_SCRIPTS}
                        ^----------------------^ SC2248 (style): Prefer double 
quoting even when variables don't contain special characters.
   
   Did you mean: 
           && chmod a+x "${DOWNLOAD_BASE_SCRIPTS}"
   
   
   In dist/download_scripts/1.2.3/download_arm_apache.sh line 38:
   ./${DOWNLOAD_BASE_SCRIPTS} "${FE}" "${BE}" "${DEPS}" 
"${DOWNLOAD_LINK_PREFIX}" "${DOWNLOAD_DIR}"
     ^----------------------^ SC2248 (style): Prefer double quoting even when 
variables don't contain special characters.
   
   Did you mean: 
   ./"${DOWNLOAD_BASE_SCRIPTS}" "${FE}" "${BE}" "${DEPS}" 
"${DOWNLOAD_LINK_PREFIX}" "${DOWNLOAD_DIR}"
   
   
   In dist/download_scripts/1.2.3/download_arm_tsinghua.sh line 21:
   ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd)"
   ^--^ SC2034 (warning): ROOT appears unused. Verify use (or export if used 
externally).
   
   
   In dist/download_scripts/1.2.3/download_arm_tsinghua.sh line 32:
   if [ ! -f "${DOWNLOAD_BASE_SCRIPTS}" ]; then
      ^-- SC2292 (style): Prefer [[ ]] over [ ] for tests in Bash/Ksh.
   
   Did you mean: 
   if [[ ! -f "${DOWNLOAD_BASE_SCRIPTS}" ]]; then
   
   
   In dist/download_scripts/1.2.3/download_arm_tsinghua.sh line 34:
           && chmod a+x ${DOWNLOAD_BASE_SCRIPTS}
                        ^----------------------^ SC2248 (style): Prefer double 
quoting even when variables don't contain special characters.
   
   Did you mean: 
           && chmod a+x "${DOWNLOAD_BASE_SCRIPTS}"
   
   
   In dist/download_scripts/1.2.3/download_arm_tsinghua.sh line 38:
   ./${DOWNLOAD_BASE_SCRIPTS} "${FE}" "${BE}" "${DEPS}" 
"${DOWNLOAD_LINK_PREFIX}" "${DOWNLOAD_DIR}"
     ^----------------------^ SC2248 (style): Prefer double quoting even when 
variables don't contain special characters.
   
   Did you mean: 
   ./"${DOWNLOAD_BASE_SCRIPTS}" "${FE}" "${BE}" "${DEPS}" 
"${DOWNLOAD_LINK_PREFIX}" "${DOWNLOAD_DIR}"
   
   
   In dist/download_scripts/1.2.3/download_x64_apache.sh line 21:
   ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd)"
   ^--^ SC2034 (warning): ROOT appears unused. Verify use (or export if used 
externally).
   
   
   In dist/download_scripts/1.2.3/download_x64_apache.sh line 32:
   if [ ! -f "${DOWNLOAD_BASE_SCRIPTS}" ]; then
      ^-- SC2292 (style): Prefer [[ ]] over [ ] for tests in Bash/Ksh.
   
   Did you mean: 
   if [[ ! -f "${DOWNLOAD_BASE_SCRIPTS}" ]]; then
   
   
   In dist/download_scripts/1.2.3/download_x64_apache.sh line 34:
           && chmod a+x ${DOWNLOAD_BASE_SCRIPTS}
                        ^----------------------^ SC2248 (style): Prefer double 
quoting even when variables don't contain special characters.
   
   Did you mean: 
           && chmod a+x "${DOWNLOAD_BASE_SCRIPTS}"
   
   
   In dist/download_scripts/1.2.3/download_x64_apache.sh line 38:
   ./${DOWNLOAD_BASE_SCRIPTS} "${FE}" "${BE}" "${DEPS}" 
"${DOWNLOAD_LINK_PREFIX}" "${DOWNLOAD_DIR}"
     ^----------------------^ SC2248 (style): Prefer double quoting even when 
variables don't contain special characters.
   
   Did you mean: 
   ./"${DOWNLOAD_BASE_SCRIPTS}" "${FE}" "${BE}" "${DEPS}" 
"${DOWNLOAD_LINK_PREFIX}" "${DOWNLOAD_DIR}"
   
   
   In dist/download_scripts/1.2.3/download_x64_noavx2_apache.sh line 21:
   ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd)"
   ^--^ SC2034 (warning): ROOT appears unused. Verify use (or export if used 
externally).
   
   
   In dist/download_scripts/1.2.3/download_x64_noavx2_apache.sh line 32:
   if [ ! -f "${DOWNLOAD_BASE_SCRIPTS}" ]; then
      ^-- SC2292 (style): Prefer [[ ]] over [ ] for tests in Bash/Ksh.
   
   Did you mean: 
   if [[ ! -f "${DOWNLOAD_BASE_SCRIPTS}" ]]; then
   
   
   In dist/download_scripts/1.2.3/download_x64_noavx2_apache.sh line 34:
           && chmod a+x ${DOWNLOAD_BASE_SCRIPTS}
                        ^----------------------^ SC2248 (style): Prefer double 
quoting even when variables don't contain special characters.
   
   Did you mean: 
           && chmod a+x "${DOWNLOAD_BASE_SCRIPTS}"
   
   
   In dist/download_scripts/1.2.3/download_x64_noavx2_apache.sh line 38:
   ./${DOWNLOAD_BASE_SCRIPTS} "${FE}" "${BE}" "${DEPS}" 
"${DOWNLOAD_LINK_PREFIX}" "${DOWNLOAD_DIR}"
     ^----------------------^ SC2248 (style): Prefer double quoting even when 
variables don't contain special characters.
   
   Did you mean: 
   ./"${DOWNLOAD_BASE_SCRIPTS}" "${FE}" "${BE}" "${DEPS}" 
"${DOWNLOAD_LINK_PREFIX}" "${DOWNLOAD_DIR}"
   
   
   In dist/download_scripts/1.2.3/download_x64_noavx2_tsinghua.sh line 21:
   ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd)"
   ^--^ SC2034 (warning): ROOT appears unused. Verify use (or export if used 
externally).
   
   
   In dist/download_scripts/1.2.3/download_x64_noavx2_tsinghua.sh line 32:
   if [ ! -f "${DOWNLOAD_BASE_SCRIPTS}" ]; then
      ^-- SC2292 (style): Prefer [[ ]] over [ ] for tests in Bash/Ksh.
   
   Did you mean: 
   if [[ ! -f "${DOWNLOAD_BASE_SCRIPTS}" ]]; then
   
   
   In dist/download_scripts/1.2.3/download_x64_noavx2_tsinghua.sh line 34:
           && chmod a+x ${DOWNLOAD_BASE_SCRIPTS}
                        ^----------------------^ SC2248 (style): Prefer double 
quoting even when variables don't contain special characters.
   
   Did you mean: 
           && chmod a+x "${DOWNLOAD_BASE_SCRIPTS}"
   
   
   In dist/download_scripts/1.2.3/download_x64_noavx2_tsinghua.sh line 38:
   ./${DOWNLOAD_BASE_SCRIPTS} "${FE}" "${BE}" "${DEPS}" 
"${DOWNLOAD_LINK_PREFIX}" "${DOWNLOAD_DIR}"
     ^----------------------^ SC2248 (style): Prefer double quoting even when 
variables don't contain special characters.
   
   Did you mean: 
   ./"${DOWNLOAD_BASE_SCRIPTS}" "${FE}" "${BE}" "${DEPS}" 
"${DOWNLOAD_LINK_PREFIX}" "${DOWNLOAD_DIR}"
   
   
   In dist/download_scripts/1.2.3/download_x64_tsinghua.sh line 21:
   ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd)"
   ^--^ SC2034 (warning): ROOT appears unused. Verify use (or export if used 
externally).
   
   
   In dist/download_scripts/1.2.3/download_x64_tsinghua.sh line 32:
   if [ ! -f "${DOWNLOAD_BASE_SCRIPTS}" ]; then
      ^-- SC2292 (style): Prefer [[ ]] over [ ] for tests in Bash/Ksh.
   
   Did you mean: 
   if [[ ! -f "${DOWNLOAD_BASE_SCRIPTS}" ]]; then
   
   
   In dist/download_scripts/1.2.3/download_x64_tsinghua.sh line 34:
           && chmod a+x ${DOWNLOAD_BASE_SCRIPTS}
                        ^----------------------^ SC2248 (style): Prefer double 
quoting even when variables don't contain special characters.
   
   Did you mean: 
           && chmod a+x "${DOWNLOAD_BASE_SCRIPTS}"
   
   
   In dist/download_scripts/1.2.3/download_x64_tsinghua.sh line 38:
   ./${DOWNLOAD_BASE_SCRIPTS} "${FE}" "${BE}" "${DEPS}" 
"${DOWNLOAD_LINK_PREFIX}" "${DOWNLOAD_DIR}"
     ^----------------------^ SC2248 (style): Prefer double quoting even when 
variables don't contain special characters.
   
   Did you mean: 
   ./"${DOWNLOAD_BASE_SCRIPTS}" "${FE}" "${BE}" "${DEPS}" 
"${DOWNLOAD_LINK_PREFIX}" "${DOWNLOAD_DIR}"
   
   
   In dist/download_scripts/download_base.sh line 35:
   ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd)"
   ^--^ SC2034 (warning): ROOT appears unused. Verify use (or export if used 
externally).
   
   
   In dist/download_scripts/download_base.sh line 46:
   if [ $? -ne 0 ]; then
      ^----------^ SC2292 (style): Prefer [[ ]] over [ ] for tests in Bash/Ksh.
        ^-- SC2181 (style): Check exit code directly with e.g. 'if ! mycmd;', 
not indirectly with $?.
   
   Did you mean: 
   if [[ $? -ne 0 ]]; then
   
   
   In dist/download_scripts/download_base.sh line 52:
   if [ -f "${DOWNLOAD_DIR}" -o -d "${DOWNLOAD_DIR}" ]; then
      ^-- SC2292 (style): Prefer [[ ]] over [ ] for tests in Bash/Ksh.
                             ^-- SC2166 (warning): Prefer [ p ] || [ q ] as [ p 
-o q ] is not well defined.
   
   
   In dist/download_scripts/download_base.sh line 53:
       read -p "Download dir ${DOWNLOAD_DIR} already exists. Overwrite? [y/n] " 
resp
       ^--^ SC2162 (info): read without -r will mangle backslashes.
   
   
   In dist/download_scripts/download_base.sh line 54:
       if [ "${resp}" = "y" -o "${resp}" = "Y" ]
          ^-- SC2292 (style): Prefer [[ ]] over [ ] for tests in Bash/Ksh.
                            ^-- SC2166 (warning): Prefer [ p ] || [ q ] as [ p 
-o q ] is not well defined.
   
   
   In dist/download_scripts/download_base.sh line 81:
   download "FE" ${FE_LINK} ${DOWNLOAD_DIR}
                 ^--------^ SC2086 (info): Double quote to prevent globbing and 
word splitting.
                            ^-------------^ SC2086 (info): Double quote to 
prevent globbing and word splitting.
   
   Did you mean: 
   download "FE" "${FE_LINK}" "${DOWNLOAD_DIR}"
   
   
   In dist/download_scripts/download_base.sh line 82:
   download "BE" ${BE_LINK} ${DOWNLOAD_DIR}
                 ^--------^ SC2086 (info): Double quote to prevent globbing and 
word splitting.
                            ^-------------^ SC2086 (info): Double quote to 
prevent globbing and word splitting.
   
   Did you mean: 
   download "BE" "${BE_LINK}" "${DOWNLOAD_DIR}"
   
   
   In dist/download_scripts/download_base.sh line 83:
   download "DEPS" ${DEPS_LINK} ${DOWNLOAD_DIR}
                   ^----------^ SC2086 (info): Double quote to prevent globbing 
and word splitting.
                                ^-------------^ SC2086 (info): Double quote to 
prevent globbing and word splitting.
   
   Did you mean: 
   download "DEPS" "${DEPS_LINK}" "${DOWNLOAD_DIR}"
   
   For more information:
     https://www.shellcheck.net/wiki/SC2034 -- ROOT appears unused. Verify use 
(...
     https://www.shellcheck.net/wiki/SC2166 -- Prefer [ p ] || [ q ] as [ p -o 
q...
     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:
   
   ----------
   --- dist/download_scripts/1.2.3/download_arm_apache.sh.orig
   +++ dist/download_scripts/1.2.3/download_arm_apache.sh
   @@ -30,10 +30,9 @@
    DOWNLOAD_BASE_SCRIPTS="download_base.sh"
    
    if [ ! -f "${DOWNLOAD_BASE_SCRIPTS}" ]; then
   -   curl -O 
https://raw.githubusercontent.com/apache/doris/master/dist/download_scripts/download_base.sh
 \
   -        && chmod a+x ${DOWNLOAD_BASE_SCRIPTS}
   +    curl -O 
https://raw.githubusercontent.com/apache/doris/master/dist/download_scripts/download_base.sh
 &&
   +        chmod a+x ${DOWNLOAD_BASE_SCRIPTS}
    fi
    
    # Begin to download
    ./${DOWNLOAD_BASE_SCRIPTS} "${FE}" "${BE}" "${DEPS}" 
"${DOWNLOAD_LINK_PREFIX}" "${DOWNLOAD_DIR}"
   -
   --- dist/download_scripts/1.2.3/download_arm_tsinghua.sh.orig
   +++ dist/download_scripts/1.2.3/download_arm_tsinghua.sh
   @@ -30,10 +30,9 @@
    DOWNLOAD_BASE_SCRIPTS="download_base.sh"
    
    if [ ! -f "${DOWNLOAD_BASE_SCRIPTS}" ]; then
   -   curl -O 
https://raw.githubusercontent.com/apache/doris/master/dist/download_scripts/download_base.sh
 \
   -        && chmod a+x ${DOWNLOAD_BASE_SCRIPTS}
   +    curl -O 
https://raw.githubusercontent.com/apache/doris/master/dist/download_scripts/download_base.sh
 &&
   +        chmod a+x ${DOWNLOAD_BASE_SCRIPTS}
    fi
    
    # Begin to download
    ./${DOWNLOAD_BASE_SCRIPTS} "${FE}" "${BE}" "${DEPS}" 
"${DOWNLOAD_LINK_PREFIX}" "${DOWNLOAD_DIR}"
   -
   --- dist/download_scripts/1.2.3/download_x64_apache.sh.orig
   +++ dist/download_scripts/1.2.3/download_x64_apache.sh
   @@ -30,10 +30,9 @@
    DOWNLOAD_BASE_SCRIPTS="download_base.sh"
    
    if [ ! -f "${DOWNLOAD_BASE_SCRIPTS}" ]; then
   -   curl -O 
https://raw.githubusercontent.com/apache/doris/master/dist/download_scripts/download_base.sh
 \
   -        && chmod a+x ${DOWNLOAD_BASE_SCRIPTS}
   +    curl -O 
https://raw.githubusercontent.com/apache/doris/master/dist/download_scripts/download_base.sh
 &&
   +        chmod a+x ${DOWNLOAD_BASE_SCRIPTS}
    fi
    
    # Begin to download
    ./${DOWNLOAD_BASE_SCRIPTS} "${FE}" "${BE}" "${DEPS}" 
"${DOWNLOAD_LINK_PREFIX}" "${DOWNLOAD_DIR}"
   -
   --- dist/download_scripts/1.2.3/download_x64_noavx2_apache.sh.orig
   +++ dist/download_scripts/1.2.3/download_x64_noavx2_apache.sh
   @@ -30,10 +30,9 @@
    DOWNLOAD_BASE_SCRIPTS="download_base.sh"
    
    if [ ! -f "${DOWNLOAD_BASE_SCRIPTS}" ]; then
   -   curl -O 
https://raw.githubusercontent.com/apache/doris/master/dist/download_scripts/download_base.sh
 \
   -        && chmod a+x ${DOWNLOAD_BASE_SCRIPTS}
   +    curl -O 
https://raw.githubusercontent.com/apache/doris/master/dist/download_scripts/download_base.sh
 &&
   +        chmod a+x ${DOWNLOAD_BASE_SCRIPTS}
    fi
    
    # Begin to download
    ./${DOWNLOAD_BASE_SCRIPTS} "${FE}" "${BE}" "${DEPS}" 
"${DOWNLOAD_LINK_PREFIX}" "${DOWNLOAD_DIR}"
   -
   --- dist/download_scripts/1.2.3/download_x64_noavx2_tsinghua.sh.orig
   +++ dist/download_scripts/1.2.3/download_x64_noavx2_tsinghua.sh
   @@ -30,10 +30,9 @@
    DOWNLOAD_BASE_SCRIPTS="download_base.sh"
    
    if [ ! -f "${DOWNLOAD_BASE_SCRIPTS}" ]; then
   -   curl -O 
https://raw.githubusercontent.com/apache/doris/master/dist/download_scripts/download_base.sh
 \
   -        && chmod a+x ${DOWNLOAD_BASE_SCRIPTS}
   +    curl -O 
https://raw.githubusercontent.com/apache/doris/master/dist/download_scripts/download_base.sh
 &&
   +        chmod a+x ${DOWNLOAD_BASE_SCRIPTS}
    fi
    
    # Begin to download
    ./${DOWNLOAD_BASE_SCRIPTS} "${FE}" "${BE}" "${DEPS}" 
"${DOWNLOAD_LINK_PREFIX}" "${DOWNLOAD_DIR}"
   -
   --- dist/download_scripts/1.2.3/download_x64_tsinghua.sh.orig
   +++ dist/download_scripts/1.2.3/download_x64_tsinghua.sh
   @@ -30,10 +30,9 @@
    DOWNLOAD_BASE_SCRIPTS="download_base.sh"
    
    if [ ! -f "${DOWNLOAD_BASE_SCRIPTS}" ]; then
   -   curl -O 
https://raw.githubusercontent.com/apache/doris/master/dist/download_scripts/download_base.sh
 \
   -        && chmod a+x ${DOWNLOAD_BASE_SCRIPTS}
   +    curl -O 
https://raw.githubusercontent.com/apache/doris/master/dist/download_scripts/download_base.sh
 &&
   +        chmod a+x ${DOWNLOAD_BASE_SCRIPTS}
    fi
    
    # Begin to download
    ./${DOWNLOAD_BASE_SCRIPTS} "${FE}" "${BE}" "${DEPS}" 
"${DOWNLOAD_LINK_PREFIX}" "${DOWNLOAD_DIR}"
   -
   --- dist/download_scripts/download_base.sh.orig
   +++ dist/download_scripts/download_base.sh
   @@ -27,7 +27,7 @@
    #       apache-doris-dependencies-1.2.3-bin-x86_64                          
\
    #       https://mirrors.tuna.tsinghua.edu.cn/apache/doris/1.2/1.2.3-rc02/   
\
    #       apache-doris-1.2.3-bin
   - 
   +
    
###############################################################################
    
    set -eo pipefail
   @@ -42,7 +42,7 @@
    FILE_SUFFIX=".tar.xz"
    
    # Check if curl cmd exists
   -which curl > /dev/null 2>&1
   +which curl >/dev/null 2>&1
    if [ $? -ne 0 ]; then
        echo "curl command not found on the system"
        exit 1
   @@ -51,8 +51,7 @@
    # Check download dir
    if [ -f "${DOWNLOAD_DIR}" -o -d "${DOWNLOAD_DIR}" ]; then
        read -p "Download dir ${DOWNLOAD_DIR} already exists. Overwrite? [y/n] 
" resp
   -    if [ "${resp}" = "y" -o "${resp}" = "Y" ]
   -    then
   +    if [ "${resp}" = "y" -o "${resp}" = "Y" ]; then
            rm -rf "${DOWNLOAD_DIR}"
            echo "Origin ${DOWNLOAD_DIR} has been removed and created a new 
one".
        else
   @@ -90,4 +89,3 @@
    
    echo "Download complete!"
    echo "You can now deploy Apache Doris from ${DOWNLOAD_DIR}/"
   -
   ----------
   
   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