Repository navigation
test: rc.27 e2e (old action) - #85
shenxianpeng wants to merge 2 commits into
Conversation
There was a problem hiding this comment.
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
| total += 14; | ||
| return total; | ||
| } | ||
| // touched |
There was a problem hiding this comment.
clang-tidy suggestion
| // touched | |
| // touched |
| int fixits(int x, int *p) { | ||
| if (p == 0) |
There was a problem hiding this comment.
clang-tidy diagnostic(s)
- function 'fixits' can be made static or moved into an anonymous namespace to enforce internal linkage [misc-use-internal-linkage]
- use a trailing return type for this function [modernize-use-trailing-return-type]
- pointer parameter 'p' can be pointer to const [readability-non-const-parameter]
- use nullptr [modernize-use-nullptr]
- statement should be inside braces [readability-braces-around-statements]
| 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) {
| ^| int fixits(int x, int *p) { | ||
| if (p == 0) | ||
| return 0; | ||
| if (x > 1) |
There was a problem hiding this comment.
clang-tidy diagnostic(s)
- statement should be inside braces [readability-braces-around-statements]
| if (x > 1) | |
| } | |
| if (x > 1) { |
| else | ||
| return 2; |
There was a problem hiding this comment.
clang-tidy diagnostic(s)
- statement should be inside braces [readability-braces-around-statements]
- do not use 'else' after 'return' [readability-else-after-return]
| 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| int added(){ | ||
| int x=1; | ||
| printf("%d",x); | ||
| return x;} No newline at end of file |
There was a problem hiding this comment.
clang-tidy diagnostic(s)
- function 'added' can be made static or moved into an anonymous namespace to enforce internal linkage [misc-use-internal-linkage]
- use a trailing return type for this function [modernize-use-trailing-return-type]
- variable 'x' of type 'int' can be declared 'const' [misc-const-correctness]
| 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);
| ^| int main(){ | ||
| char* p = NULL; | ||
| printf("%d\n",f(3)); return 0;} | ||
| int edited_space( ){return 1;} |
There was a problem hiding this comment.
clang-tidy diagnostic(s)
- function 'edited_space' can be made static or moved into an anonymous namespace to enforce internal linkage [misc-use-internal-linkage]
- use a trailing return type for this function [modernize-use-trailing-return-type]
| int edited_space( ){return 1;} | |
| static auto edited_space() -> int { return 1; } |
Cpp-Linter Report
|
Temporary e2e PR for cpp-linter-rs rc.27 (old action ref). Close after the test.
Generated by Claude Code