Skip to content

test: stress PR for cpp-linter-action v3.0.0-rc0 - #79

Open
shenxianpeng wants to merge 1 commit into
claude/project-thread-hdejwtfrom
e2e/stress-v3-43756669910
Open

shenxianpeng wants to merge 1 commit into
claude/project-thread-hdejwtfrom
e2e/stress-v3-43756669910

Conversation

@shenxianpeng

@shenxianpeng shenxianpeng commented Nov 15, 2026 •

Copy link
Copy Markdown
Member

Requested by Xianpeng · project thread

Temporary test PR, do not merge. Runs cpp-linter-action @v3.0.0-rc0 on a fixture with a pure rename, a mode-only change, a file without a final newline and edits to files with unusual names, to compare with the v2 PR opened from the same commit.

github-actions[bot]

This comment was marked as outdated.

@github-actions

github-actions Bot commented Nov 15, 2026 •

Copy link
Copy Markdown

⚠ cpp-linter found 12 issues in 3 files

Tool Result
⚠ clang-format 21.1.8 3 files need formatting
⚠ clang-tidy 21.1.8 9 warnings, 7 fixable
clang-tidy: 9 warnings, 7 fixable

src/no_final_newline.cpp

Line Finding
2 function 'added' can be made static or moved into an anonymous namespace to enforce internal linkage (fixable)
misc-use-internal-linkage
2 use a trailing return type for this function (fixable)
modernize-use-trailing-return-type
3 variable 'x' of type 'int' can be declared 'const' (fixable)
misc-const-correctness
3 variable name 'x' is too short, expected at least 3 characters
readability-identifier-length
4 do not call c-style vararg functions
cppcoreguidelines-pro-type-vararg

stress/with space.cpp

Line Finding
6 function 'edited_space' can be made static or moved into an anonymous namespace to enforce internal linkage (fixable)
misc-use-internal-linkage
6 use a trailing return type for this function (fixable)
modernize-use-trailing-return-type

stress/中文.cpp

Line Finding
6 function 'edited_cjk' can be made static or moved into an anonymous namespace to enforce internal linkage (fixable)
misc-use-internal-linkage
6 use a trailing return type for this function (fixable)
modernize-use-trailing-return-type
clang-format: 3 files
  • src/no_final_newline.cpp, lines 2-5
  • stress/with space.cpp, line 6
  • stress/中文.cpp, line 6
How to fix

From the repository root, format the listed lines with clang-format 21:

clang-format -i --style=llvm --lines=2:5 src/no_final_newline.cpp
clang-format -i --style=llvm --lines=6:6 'stress/with space.cpp'
clang-format -i --style=llvm --lines=6:6 'stress/中文.cpp'

Or apply every fix at once: this step's fix-patch-path output is a patch for git apply.

For the clang-tidy findings, give this to your coding agent:

Fix these clang-tidy findings:
- src/no_final_newline.cpp:2:5: warning: function 'added' can be made static or moved into an anonymous namespace to enforce internal linkage [misc-use-internal-linkage]
- src/no_final_newline.cpp:2:5: warning: use a trailing return type for this function [modernize-use-trailing-return-type]
- src/no_final_newline.cpp:3:3: warning: variable 'x' of type 'int' can be declared 'const' [misc-const-correctness]
- src/no_final_newline.cpp:3:9: warning: variable name 'x' is too short, expected at least 3 characters [readability-identifier-length]
- src/no_final_newline.cpp:4:3: warning: do not call c-style vararg functions [cppcoreguidelines-pro-type-vararg]
- stress/with space.cpp:6:7: warning: function 'edited_space' can be made static or moved into an anonymous namespace to enforce internal linkage [misc-use-internal-linkage]
- stress/with space.cpp:6:7: warning: use a trailing return type for this function [modernize-use-trailing-return-type]
- stress/中文.cpp:6:7: warning: function 'edited_cjk' can be made static or moved into an anonymous namespace to enforce internal linkage [misc-use-internal-linkage]
- stress/中文.cpp:6:7: warning: use a trailing return type for this function [modernize-use-trailing-return-type]

Powered by cpp-linter | Feedback

@github-actions
github-actions Bot dismissed their stale review November 25, 2026 13:18

outdated review

@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

3 comments (clang-format 21.1.8, clang-tidy 21.1.8)

Powered by cpp-linter | Feedback

Comment thread src/no_final_newline.cpp
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.

⚠ Warning: misc-use-internal-linkage

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

⚠ Warning: modernize-use-trailing-return-type

use a trailing return type for this function

⚠ Warning: misc-const-correctness

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

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

⚠ Warning: readability-identifier-length

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

⚠ Warning: cppcoreguidelines-pro-type-vararg

do not call c-style vararg functions

Comment thread stress/with space.cpp
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.

⚠ Warning: misc-use-internal-linkage

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

⚠ Warning: modernize-use-trailing-return-type

use a trailing return type for this function

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

Comment thread stress/中文.cpp
int main(){
char* p = NULL;
printf("%d\n",f(3)); return 0;}
int edited_cjk( ){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.

⚠ Warning: misc-use-internal-linkage

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

⚠ Warning: modernize-use-trailing-return-type

use a trailing return type for this function

Suggested change
int edited_cjk( ){return 2;}
static auto edited_cjk() -> int { return 2; }

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