Skip to content

test: e2e of cpp-linter-action main (79dfaae, cpp-linter 1.15.1) - #76

Closed
shenxianpeng wants to merge 1 commit into
masterfrom
e2e/run-43102458984
Closed

shenxianpeng wants to merge 1 commit into
masterfrom
e2e/run-43102458984

Conversation

@shenxianpeng

@shenxianpeng shenxianpeng commented Nov 11, 2026 •

Copy link
Copy Markdown
Member

Baseline e2e of cpp-linter-action main (commit 79dfaae, cpp-linter 1.15.1 + git-bot-feedback 0.5.1) for comparison with #75. Do not merge. Closed automatically when all checks pass.

@github-actions

Copy link
Copy Markdown

Cpp-Linter Report ⚠️

Some files did not pass the configured checks!

clang-format (v21.1.8) reports: 1 file(s) not formatted
  • src/demo.cpp
clang-tidy (v21.1.8) reports: 5 concern(s)
  • src/demo.cpp:9:5: warning: [misc-use-internal-linkage]

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

        9 | int scale(int value)
          |     ^
          | static 
  • src/demo.cpp:9:5: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

        9 | int scale(int value)
          | ~~~ ^               
          | auto                 -> int
  • src/demo.cpp:11:19: warning: [readability-braces-around-statements]

    statement should be inside braces

       11 |     if (value > 0)
          |                   ^
          |                    {
       12 |         return value*3;
          |                        
  • src/demo.cpp:21:5: warning: [cppcoreguidelines-pro-type-vararg]

    do not call c-style vararg functions

       21 |     printf("Hello world! %d\n", scale( 14 ));
          |     ^
  • src/demo.cpp:21:40: warning: [cppcoreguidelines-avoid-magic-numbers]

    14 is a magic number; consider replacing it with a named constant

       21 |     printf("Hello world! %d\n", scale( 14 ));
          |                                        ^

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

@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-tidy v21.1.8

Only 3 out of 4 clang-tidy concerns fit within this pull request's diff.

Click here for the full clang-tidy patch
diff --git a/src/demo.cpp b/src/demo.cpp
--- a/src/demo.cpp
+++ b/src/demo.cpp
@@ -9 +9 @@ size_t dummyFunc(size_t i) { return i; }
-int scale(int value)
+static auto scale(int value) -> int
@@ -11,2 +11,3 @@ int scale(int value)
-    if (value > 0)
-        return value*3;
+    if (value > 0) {
+        return value * 3;
+    }

Used clang-format v21.1.8

Click here for the full clang-format patch
diff --git a/src/demo.cpp b/src/demo.cpp
--- a/src/demo.cpp
+++ b/src/demo.cpp
@@ -12 +12 @@ int scale(int value)
-        return value*3;
+        return value * 3;
@@ -21 +21 @@ int main()
-    printf("Hello world! %d\n", scale( 14 ));
+    printf("Hello world! %d\n", scale(14));

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

Comment thread src/demo.cpp
int scale(int value)
{
if (value > 0)
return value*3;

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-format suggestion

Suggested change
return value*3;
return value * 3;

Comment thread src/demo.cpp
break;

printf("Hello world!\n");
printf("Hello world! %d\n", scale( 14 ));

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-format suggestion

Suggested change
printf("Hello world! %d\n", scale( 14 ));
printf("Hello world! %d\n", scale(14));

clang-tidy diagnostic

src/demo.cpp:21:5: warning: [cppcoreguidelines-pro-type-vararg]

do not call c-style vararg functions

   21 |     printf("Hello world! %d\n", scale( 14 ));
      |     ^

clang-tidy diagnostic

src/demo.cpp:21:40: warning: [cppcoreguidelines-avoid-magic-numbers]

14 is a magic number; consider replacing it with a named constant

   21 |     printf("Hello world! %d\n", scale( 14 ));
      |                                        ^

Comment thread src/demo.cpp
// using size_t from cstddef
size_t dummyFunc(size_t i) { return i; }

int scale(int value)

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 diagnostics

Suggested change
int scale(int value)
static auto scale(int value) -> int

Comment thread src/demo.cpp
Comment on lines +11 to +12
if (value > 0)
return value*3;

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 diagnostics

Suggested change
if (value > 0)
return value*3;
if (value > 0) {
return value * 3;
}

@github-actions

Copy link
Copy Markdown

e2e result: passed

cpp-linter-action 79dfaaef8e18815e923592c1d5098c7e0d25ecf6 (79dfaae), clang 21,
workflow run

Check Actual Expected
lint jobs success success ✅
outputs on ubuntu-latest (total/tidy/format) 6/5/1 tidy > 0, format > 0, total = tidy + format ✅
outputs on macos-latest (total/tidy/format) 6/5/1 tidy > 0, format > 0, total = tidy + format ✅
outputs on windows-latest (total/tidy/format) 6/5/1 tidy > 0, format > 0, total = tidy + format ✅
thread comments 1 1 ✅
PR reviews 1 (latest: CHANGES_REQUESTED) 1 or more (latest: CHANGES_REQUESTED) ✅
review comments 4 1 or more ✅
file annotations on src/ 6 2 or more ✅

@github-actions github-actions Bot closed this Nov 11, 2026
@github-actions
github-actions Bot deleted the e2e/run-43102458984 branch November 11, 2026 22:35
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