Skip to content

fix#43715

Closed
qidaye wants to merge 2 commits intoapache:test_emailfrom
qidaye:test_email_4
Closed

fix#43715
qidaye wants to merge 2 commits intoapache:test_emailfrom
qidaye:test_email_4

Conversation

@qidaye
Copy link
Contributor

@qidaye qidaye commented Nov 12, 2024

What problem does this PR solve?

Issue Number: close #xxx

Related PR: #xxx

Problem Summary:

Release note

None

Check List (For Author)

  • Test

    • Regression test
    • Unit Test
    • Manual test (add detailed scripts or steps below)
    • No need to test or manual test. Explain why:
      • This is a refactor/code format and no logic has been changed.
      • Previous test can cover this change.
      • No code files have been changed.
      • Other reason
  • Behavior changed:

    • No.
    • Yes.
  • Does this need documentation?

    • No.
    • Yes.

Check List (For Reviewer who merge this PR)

  • Confirm the release note
  • Confirm test cases
  • Confirm document
  • Add branch pick label

@doris-robot
Copy link

Thank you for your contribution to Apache Doris.
Don't know what should be done next? See How to process your PR.

Please clearly describe your PR:

  1. What problem was fixed (it's best to include specific error reporting information). How it was fixed.
  2. Which behaviors were modified. What was the previous behavior, what is it now, why was it modified, and what possible impacts might there be.
  3. What features were added. Why was this function added?
  4. Which code was refactored and why was this part of the code refactored?
  5. Which functions were optimized and what is the difference before and after the optimization?

@github-actions
Copy link
Contributor

sh-checker report

To get the full details, please check in the job output.

shellcheck errors

'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.



shfmt errors

'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


@github-actions
Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

@github-actions
Copy link
Contributor

sh-checker report

To get the full details, please check in the job output.

shellcheck errors

'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.



shfmt errors

'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


@qidaye qidaye closed this Nov 12, 2024
@qidaye qidaye deleted the test_email_4 branch November 12, 2024 07:09
@github-actions
Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants