Skip to content

test: rc.27 e2e (old action) - #85

Open
shenxianpeng wants to merge 2 commits into
claude/project-thread-u751ea-rc27from
e2e/rc27-old-44998611247
Open

shenxianpeng wants to merge 2 commits into
claude/project-thread-u751ea-rc27from
e2e/rc27-old-44998611247

Conversation

@shenxianpeng

Copy link
Copy Markdown
Member

Temporary e2e PR for cpp-linter-rs rc.27 (old action ref). Close after the test.


Generated by Claude Code

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cpp-linter Review

Used clang-format v21.1.8

Used clang-tidy v21.1.8

Some concerns could not be posted as suggestions:

  • -top.cpp: clang-format failed to run, so the formatting was not checked (see the logs)
  • stress/latin1.cpp: 1 fix(es) are only in the patch file because the file is not UTF-8 encoded

✨ Powered by cpp-linter -- ⭐ Star • ❤️ Sponsor • 💬 Feedback

Comment thread cap/many.cpp Outdated
total += 14;
return total;
}
// touched

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-tidy suggestion

Suggested change
// touched
// touched

Comment thread src/fixits.cpp Outdated
Comment on lines +1 to +2
int fixits(int x, int *p) {
if (p == 0)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-tidy diagnostic(s)

Suggested change
int fixits(int x, int *p) {
if (p == 0)
static auto fixits(int x, const int *p) -> int {
if (p == nullptr) {

clang-tidy diagnostic

src/fixits.cpp:1:16 warning: [readability-identifier-length]

parameter name 'x' is too short, expected at least 3 characters

    1 | int fixits(int x, int *p) {
      |                ^

clang-tidy diagnostic

src/fixits.cpp:1:24 warning: [readability-identifier-length]

parameter name 'p' is too short, expected at least 3 characters

    1 | int fixits(int x, int *p) {
      |                        ^

Comment thread src/fixits.cpp Outdated
int fixits(int x, int *p) {
if (p == 0)
return 0;
if (x > 1)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-tidy diagnostic(s)

Suggested change
if (x > 1)
}
if (x > 1) {

Comment thread src/fixits.cpp Outdated
Comment on lines +6 to +7
else
return 2;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-tidy diagnostic(s)

Suggested change
else
return 2;
}
return 2;

clang-tidy diagnostic

src/fixits.cpp:6:7 warning: [readability-braces-around-statements]

statement should be inside braces

    6 |   else
      |       ^
note: this fix will not be applied because it overlaps with another fix

Comment thread src/no_final_newline.cpp Outdated
Comment on lines +2 to +5
int added(){
int x=1;
printf("%d",x);
return x;} No newline at end of file

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-tidy diagnostic(s)

Suggested change
int added(){
int x=1;
printf("%d",x);
return x;}
static auto added() -> int {
int const x = 1;
printf("%d", x);
return x;
}

clang-tidy diagnostic

src/no_final_newline.cpp:3:9 warning: [readability-identifier-length]

variable name 'x' is too short, expected at least 3 characters

    3 |   int   x=1;
      |         ^

clang-tidy diagnostic

src/no_final_newline.cpp:4:3 warning: [cppcoreguidelines-pro-type-vararg]

do not call c-style vararg functions

    4 |   printf("%d",x);
      |   ^

Comment thread stress/with space.cpp Outdated
int main(){
char* p = NULL;
printf("%d\n",f(3)); return 0;}
int edited_space( ){return 1;}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-tidy diagnostic(s)

Suggested change
int edited_space( ){return 1;}
static auto edited_space() -> int { return 1; }

@github-actions

Copy link
Copy Markdown

Cpp-Linter Report ⚠️

Some files did not pass the configured checks!

clang-format (v21.1.8) reports: 5 file(s) not formatted
  • -top.cpp (clang-format failed to run; see the logs)
  • cap/many.cpp (1 line)
  • src/no_final_newline.cpp (4 lines)
  • stress/latin1.cpp (1 line)
  • stress/with space.cpp (1 line)
clang-tidy (v21.1.8) reports: 19 concern(s)
  • src/fixits.cpp

    src/fixits.cpp:1:5: warning: [misc-use-internal-linkage]
    ⚡ auto-fix included in generated patch1

    function 'fixits' can be made static or moved into an anonymous namespace to enforce internal linkage

        1 | int fixits(int x, int *p) {
          |     ^
          | static 
  • src/fixits.cpp

    src/fixits.cpp:1:5: warning: [modernize-use-trailing-return-type]
    ⚡ auto-fix included in generated patch1

    use a trailing return type for this function

        1 | int fixits(int x, int *p) {
          | ~~~ ^
          | auto                      -> int
  • src/fixits.cpp

    src/fixits.cpp:1:16: warning: [readability-identifier-length]

    parameter name 'x' is too short, expected at least 3 characters

        1 | int fixits(int x, int *p) {
          |                ^
  • src/fixits.cpp

    src/fixits.cpp:1:24: warning: [readability-identifier-length]

    parameter name 'p' is too short, expected at least 3 characters

        1 | int fixits(int x, int *p) {
          |                        ^
  • src/fixits.cpp

    src/fixits.cpp:1:24: warning: [readability-non-const-parameter]
    ⚡ auto-fix included in generated patch1

    pointer parameter 'p' can be pointer to const

        1 | int fixits(int x, int *p) {
          |                        ^
          |                   const 
  • src/fixits.cpp

    src/fixits.cpp:2:12: warning: [modernize-use-nullptr]
    ⚡ auto-fix included in generated patch1

    use nullptr

        2 |   if (p == 0)
          |            ^
          |            nullptr
  • src/fixits.cpp

    src/fixits.cpp:2:14: warning: [readability-braces-around-statements]
    ⚡ auto-fix included in generated patch1

    statement should be inside braces

        2 |   if (p == 0)
          |              ^
          |               {
        3 |     return 0;
          |              
  • src/fixits.cpp

    src/fixits.cpp:4:13: warning: [readability-braces-around-statements]
    ⚡ auto-fix included in generated patch1

    statement should be inside braces

        4 |   if (x > 1)
          |             ^
          |              {
        5 |     return 1;
        6 |   else
          |   } 
  • src/fixits.cpp

    src/fixits.cpp:6:3: warning: [readability-else-after-return]
    ⚡ auto-fix included in generated patch1

    do not use 'else' after 'return'

        6 |   else
          |   ^~~~
          |       return 2
        7 |     return 2;
          |     ~~~~~~~~
  • src/fixits.cpp

    src/fixits.cpp:6:7: warning: [readability-braces-around-statements]

    statement should be inside braces

        6 |   else
          |       ^
    note: this fix will not be applied because it overlaps with another fix
  • src/no_final_newline.cpp

    src/no_final_newline.cpp:2:5: warning: [misc-use-internal-linkage]
    ⚡ auto-fix included in generated patch1

    function 'added' can be made static or moved into an anonymous namespace to enforce internal linkage

        2 | int added(){
          |     ^
          | static 
  • src/no_final_newline.cpp

    src/no_final_newline.cpp:2:5: warning: [modernize-use-trailing-return-type]
    ⚡ auto-fix included in generated patch1

    use a trailing return type for this function

        2 | int added(){
          | ~~~ ^      
          | auto        -> int
  • src/no_final_newline.cpp

    src/no_final_newline.cpp:3:3: warning: [misc-const-correctness]
    ⚡ auto-fix included in generated patch1

    variable 'x' of type 'int' can be declared 'const'

        3 |   int   x=1;
          |   ^
          |         const 
  • src/no_final_newline.cpp

    src/no_final_newline.cpp:3:9: warning: [readability-identifier-length]

    variable name 'x' is too short, expected at least 3 characters

        3 |   int   x=1;
          |         ^
  • src/no_final_newline.cpp

    src/no_final_newline.cpp:4:3: warning: [cppcoreguidelines-pro-type-vararg]

    do not call c-style vararg functions

        4 |   printf("%d",x);
          |   ^
  • stress/latin1.cpp

    stress/latin1.cpp:7:7: warning: [misc-use-internal-linkage]
    ⚡ auto-fix included in generated patch1

    function 'edited_latin1' can be made static or moved into an anonymous namespace to enforce internal linkage

        7 | int   edited_latin1( ){return 3;}
          |       ^
          | static 
  • stress/latin1.cpp

    stress/latin1.cpp:7:7: warning: [modernize-use-trailing-return-type]
    ⚡ auto-fix included in generated patch1

    use a trailing return type for this function

        7 | int   edited_latin1( ){return 3;}
          | ~~~   ^               
          | auto                   -> int
  • stress/with space.cpp

    stress/with space.cpp:6:7: warning: [misc-use-internal-linkage]
    ⚡ auto-fix included in generated patch1

    function 'edited_space' can be made static or moved into an anonymous namespace to enforce internal linkage

        6 | int   edited_space( ){return 1;}
          |       ^
          | static 
  • stress/with space.cpp

    stress/with space.cpp:6:7: warning: [modernize-use-trailing-return-type]
    ⚡ auto-fix included in generated patch1

    use a trailing return type for this function

        6 | int   edited_space( ){return 1;}
          | ~~~   ^              
          | auto                  -> int

✨ Powered by cpp-linter -- ⭐ Star • ❤️ Sponsor • 💬 Feedback

Footnotes

  1. Cpp-linter generates a patch with fixes from both clang-tidy and clang-format. In the CI workflow, the patch can be found using cpp-linter's output fix-patch-path. ↩ ↩2 ↩3 ↩4 ↩5 ↩6 ↩7 ↩8 ↩9 ↩10 ↩11 ↩12 ↩13 ↩14

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.

1 participant