Skip to content

[DO NOT MERGE] test cpp-linter-action#501 (cpp-linter 1.15.0) - #64

Closed
shenxianpeng wants to merge 6 commits into
masterfrom
claude/project-thread-c0ojvi
Closed

shenxianpeng wants to merge 6 commits into
masterfrom
claude/project-thread-c0ojvi

Conversation

@shenxianpeng

Copy link
Copy Markdown
Member

Temporary PR to run cpp-linter/cpp-linter-action#501 (cpp-linter 1.14.1 -> 1.15.0) end to end before it is merged. It will be closed after the test.

Runs the action at the #501 head on Linux x64/arm64, macOS, Windows x64/arm64, with thread comments, tidy and format reviews, annotations, step summary and auto-fix, next to a baseline run of the action's main branch.


Generated by Claude Code

@github-actions

github-actions Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

Cpp-Linter Report ⚠️

Some files did not pass the configured checks!

clang-format (v20.1.2) reports: 1 file(s) not formatted
  • src/demo.cpp
clang-tidy (v20.1.2) reports: 16 concern(s)
  • src/demo.cpp:7:8: warning: [misc-use-internal-linkage]

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

        7 | size_t dummyFunc(size_t i) { return i; }
          |        ^
          | static 
  • src/demo.cpp:7:8: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

        7 | size_t dummyFunc(size_t i) { return i; }
          | ~~~~~~ ^
          | auto                       -> size_t
  • src/demo.cpp:7:25: warning: [readability-identifier-length]

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

        7 | size_t dummyFunc(size_t i) { return i; }
          |                         ^
  • src/demo.cpp:9:5: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

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

    statement should be inside braces

       11 |     for (;;)
          |             ^
          |              {
       12 |         break;
          |               
  • src/demo.cpp:14:5: warning: [cppcoreguidelines-pro-type-vararg]

    do not call c-style vararg functions

       14 |     printf("Hello world!\n");
          |     ^
  • src/demo.cpp:20:5: warning: [misc-use-internal-linkage]

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

       20 | int addNumbers(int a, int b)
          |     ^
          | static 
  • src/demo.cpp:20:5: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

       20 | int addNumbers(int a, int b)
          | ~~~ ^                       
          | auto                         -> int
  • src/demo.cpp:20:20: warning: [readability-identifier-length]

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

       20 | int addNumbers(int a, int b)
          |                    ^
  • src/demo.cpp:20:27: warning: [readability-identifier-length]

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

       20 | int addNumbers(int a, int b)
          |                           ^
  • src/demo.cpp:22:19: warning: [modernize-use-nullptr]

    use nullptr

       22 |     int* unused = NULL;
          |                   ^~~~
          |                   nullptr
  • src/demo.cpp:23:15: warning: [readability-braces-around-statements]

    statement should be inside braces

       23 |     if (a > b)
          |               ^
          |                {
       24 |         return a + b;
          |                      
  • src/demo.cpp:29:6: warning: [misc-use-internal-linkage]

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

       29 | int  subtract( int x,int y ){ return x-y ; }
          |      ^
          | static 
  • src/demo.cpp:29:6: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

       29 | int  subtract( int x,int y ){ return x-y ; }
          | ~~~  ^                      
          | auto                         -> int
  • src/demo.cpp:29:20: warning: [readability-identifier-length]

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

       29 | int  subtract( int x,int y ){ return x-y ; }
          |                    ^
  • src/demo.cpp:29:26: warning: [readability-identifier-length]

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

       29 | int  subtract( int x,int y ){ return x-y ; }
          |                          ^

✨ 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 v20.1.2

Only 3 out of 7 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
index 3fb4fe1..591356e 100644
--- a/src/demo.cpp
+++ b/src/demo.cpp
@@ -7 +7 @@
-size_t dummyFunc(size_t i) { return i; }
+static auto dummyFunc(size_t i) -> size_t { return i; }
@@ -9 +9 @@ size_t dummyFunc(size_t i) { return i; }
-int main()
+auto main() -> int
@@ -11 +11 @@ int main()
-    for (;;)
+    for (;;) {
@@ -12,0 +13 @@ int main()
+    }
@@ -20,3 +21,6 @@ int main()
-int  addNumbers( int a,int b ){
-    int* unused = NULL;
-  if(a>b) return a+b;
+static auto addNumbers(int a, int b) -> int
+{
+    int* unused = nullptr;
+    if (a > b) {
+        return a + b;
+    }

Used clang-format v20.1.2

Click here for the full clang-format patch
diff --git a/src/demo.cpp b/src/demo.cpp
index 3fb4fe1..5b35f1e 100644
--- a/src/demo.cpp
+++ b/src/demo.cpp
@@ -3 +2,0 @@
-#include <cstdio>
@@ -4,0 +4 @@
+#include <cstdio>
@@ -20 +20,2 @@ int main()
-int  addNumbers( int a,int b ){
+int addNumbers(int a, int b)
+{
@@ -22,2 +23,3 @@ int  addNumbers( int a,int b ){
-  if(a>b) return a+b;
-    return b+a ;
+    if (a > b)
+        return a + b;
+    return b + a;

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

Comment thread src/demo.cpp
Comment thread src/demo.cpp
Comment thread src/demo.cpp
Comment thread src/demo.cpp
Comment thread src/demo.cpp
#include <cstdio>

// using size_t from cstddef
size_t dummyFunc(size_t i) { return i; }

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
size_t dummyFunc(size_t i) { return i; }
static auto dummyFunc(size_t i) -> size_t { return i; }

Comment thread src/demo.cpp

@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 v20.1.2

Only 4 out of 9 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
index 5b35f1e..9eb4de6 100644
--- a/src/demo.cpp
+++ b/src/demo.cpp
@@ -7 +7 @@
-size_t dummyFunc(size_t i) { return i; }
+static auto dummyFunc(size_t i) -> size_t { return i; }
@@ -9 +9 @@ size_t dummyFunc(size_t i) { return i; }
-int main()
+auto main() -> int
@@ -11 +11 @@ int main()
-    for (;;)
+    for (;;) {
@@ -12,0 +13 @@ int main()
+    }
@@ -20 +21 @@ int main()
-int addNumbers(int a, int b)
+static auto addNumbers(int a, int b) -> int
@@ -22,2 +23,2 @@ int addNumbers(int a, int b)
-    int* unused = NULL;
-    if (a > b)
+    int* unused = nullptr;
+    if (a > b) {
@@ -24,0 +26 @@ int addNumbers(int a, int b)
+    }

Used clang-format v20.1.2

No concerns from clang-format.

1 review comment(s) from a previous review were reused (not posted again).


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

Comment thread src/demo.cpp
}

// added to test cpp-linter-action#501 (temporary)
int addNumbers(int a, int b)

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 addNumbers(int a, int b)
static auto addNumbers(int a, int b) -> int

clang-tidy diagnostic

src/demo.cpp:20:20: warning: [readability-identifier-length]

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

   20 | int addNumbers(int a, int b)
      |                    ^

clang-tidy diagnostic

src/demo.cpp:20:27: warning: [readability-identifier-length]

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

   20 | int addNumbers(int a, int b)
      |                           ^

Comment thread src/demo.cpp
Comment on lines +22 to +23
int* unused = NULL;
if (a > b)

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* unused = NULL;
if (a > b)
int* unused = nullptr;
if (a > b) {

Comment thread src/demo.cpp
if (a > b)
return a + b;
return b + a;
}

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
}
}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Uhm, what? The indentation seems correct before the suggestion

@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 v20.1.2

Only 5 out of 10 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
index ff7f875..aaa18f3 100644
--- a/src/demo.cpp
+++ b/src/demo.cpp
@@ -7 +7 @@
-size_t dummyFunc(size_t i) { return i; }
+static auto dummyFunc(size_t i) -> size_t { return i; }
@@ -9 +9 @@ size_t dummyFunc(size_t i) { return i; }
-int main()
+auto main() -> int
@@ -11 +11 @@ int main()
-    for (;;)
+    for (;;) {
@@ -12,0 +13 @@ int main()
+    }
@@ -20 +21 @@ int main()
-int addNumbers(int a, int b)
+static auto addNumbers(int a, int b) -> int
@@ -22,2 +23,2 @@ int addNumbers(int a, int b)
-    int* unused = NULL;
-    if (a > b)
+    int* unused = nullptr;
+    if (a > b) {
@@ -24,0 +26 @@ int addNumbers(int a, int b)
+    }
@@ -29 +31 @@ int addNumbers(int a, int b)
-int  subtract( int x,int y ){ return x-y ; }
+static auto subtract(int x, int y) -> int { return x - y; }

Used clang-format v20.1.2

Click here for the full clang-format patch
diff --git a/src/demo.cpp b/src/demo.cpp
index ff7f875..d177457 100644
--- a/src/demo.cpp
+++ b/src/demo.cpp
@@ -29 +29 @@ int addNumbers(int a, int b)
-int  subtract( int x,int y ){ return x-y ; }
+int subtract(int x, int y) { return x - y; }

4 review comment(s) from a previous review were reused (not posted again).


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

Comment thread src/demo.cpp Outdated
}

// second round (temporary)
int subtract( int x,int y ){ return x-y ; }

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
int subtract( int x,int y ){ return x-y ; }
int subtract(int x, int y) { return x - y; }

clang-tidy diagnostics

Suggested change
int subtract( int x,int y ){ return x-y ; }
static auto subtract(int x, int y) -> int { return x - y; }

@2bndy5

2bndy5 commented Oct 15, 2026 •

Copy link
Copy Markdown
Collaborator

Yikes. These clang-format suggestions are useless (here, here, and here). We shouldn't see that in the current v2-RC because clang-format fixes are not gotten from the clang-format's xml output (like in v1.15). Instead, the clang-format fixes are applied directly to cache and the suggestions come from the diff between the fixed cache and the original source.

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