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

   #### `sh-checker report`
   
   To get the full details, please check in the 
[job]("https://github.com/apache/doris/actions/runs/11793062278";) output.
   
   <details>
   <summary>shellcheck errors</summary>
   
   ```
   
   'shellcheck ' returned error 1 finding the following syntactical issues:
   
   ----------
   
   In dispose.sh line 8:
   if grep -q '#include "common/compile_check_begin.h"' "$file"; then
                                                         ^---^ SC2250 (style): 
Prefer putting braces around variable references even when not strictly 
required.
   
   Did you mean: 
   if grep -q '#include "common/compile_check_begin.h"' "${file}"; then
   
   
   In dispose.sh line 9:
       echo "Skipping $file: already contains compile_check_begin.h."
                      ^---^ SC2250 (style): Prefer putting braces around 
variable references even when not strictly required.
   
   Did you mean: 
       echo "Skipping ${file}: already contains compile_check_begin.h."
   
   
   In dispose.sh line 10:
       continue
       ^------^ SC2105 (error): continue is only valid in loops.
   
   
   In dispose.sh line 14:
   if [[ "$file" == *.h ]] && grep -q '#include "common/compile_check_end.h"' 
"$file"; then
          ^---^ 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: 
   if [[ "${file}" == *.h ]] && grep -q '#include "common/compile_check_end.h"' 
"${file}"; then
   
   
   In dispose.sh line 15:
       echo "Skipping $file: already contains compile_check_end.h."
                      ^---^ SC2250 (style): Prefer putting braces around 
variable references even when not strictly required.
   
   Did you mean: 
       echo "Skipping ${file}: already contains compile_check_end.h."
   
   
   In dispose.sh line 16:
       continue
       ^------^ SC2105 (error): continue is only valid in loops.
   
   
   In dispose.sh line 20:
   namespace_line=$(grep -n '^namespace' "$file" | head -n 1 | cut -d: -f1)
                                          ^---^ SC2250 (style): Prefer putting 
braces around variable references even when not strictly required.
   
   Did you mean: 
   namespace_line=$(grep -n '^namespace' "${file}" | head -n 1 | cut -d: -f1)
   
   
   In dispose.sh line 22:
   if [ -z "$namespace_line" ]; 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 [[ -z "${namespace_line}" ]]; then
   
   
   In dispose.sh line 23:
       echo "Skipping $file: no namespace found."
                      ^---^ SC2250 (style): Prefer putting braces around 
variable references even when not strictly required.
   
   Did you mean: 
       echo "Skipping ${file}: no namespace found."
   
   
   In dispose.sh line 24:
       continue
       ^------^ SC2105 (error): continue is only valid in loops.
   
   
   In dispose.sh line 28:
   sed -i "${namespace_line}a #include \"common/compile_check_begin.h\"" "$file"
                                                                          ^---^ 
SC2250 (style): Prefer putting braces around variable references even when not 
strictly required.
   
   Did you mean: 
   sed -i "${namespace_line}a #include \"common/compile_check_begin.h\"" 
"${file}"
   
   
   In dispose.sh line 31:
   if [[ "$file" == *.h ]]; then
          ^---^ SC2250 (style): Prefer putting braces around variable 
references even when not strictly required.
   
   Did you mean: 
   if [[ "${file}" == *.h ]]; then
   
   
   In dispose.sh line 33:
       echo -e "\n#include \"common/compile_check_end.h\"" >> "$file"
                                                               ^---^ SC2250 
(style): Prefer putting braces around variable references even when not 
strictly required.
   
   Did you mean: 
       echo -e "\n#include \"common/compile_check_end.h\"" >> "${file}"
   
   
   In dispose.sh line 36:
   echo "Processed $file."
                   ^---^ SC2250 (style): Prefer putting braces around variable 
references even when not strictly required.
   
   Did you mean: 
   echo "Processed ${file}."
   
   For more information:
     https://www.shellcheck.net/wiki/SC2105 -- continue is only valid in loops.
     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:
   
   ----------
   --- dispose.sh.orig
   +++ dispose.sh
   @@ -30,8 +30,7 @@
    # 如果是 .h 文件,在文件末尾插入 compile_check_end.h
    if [[ "$file" == *.h ]]; then
        # 在末尾插入时确保前面有一个换行
   -    echo -e "\n#include \"common/compile_check_end.h\"" >> "$file"
   +    echo -e "\n#include \"common/compile_check_end.h\"" >>"$file"
    fi
    
    echo "Processed $file."
   -
   ----------
   
   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

Reply via email to