Repository navigation
test: rc.26 PR fixture (action v3 + cpp-linter 2.0.0rc25) - #80
shenxianpeng wants to merge 2 commits into
Conversation
Cpp-Linter Report
|
There was a problem hiding this comment.
Cpp-linter Review
Used clang-format v21.1.8
Used clang-tidy v21.1.8
✨ Powered by cpp-linter -- ⭐ Star • ❤️ Sponsor • 💬 Feedback
| @@ -0,0 +1,9 @@ | |||
| static auto fixits(int x, const int *p) -> int { | |||
There was a problem hiding this comment.
clang-tidy diagnostic
src/fixits.cpp:1:13 warning: [misc-use-anonymous-namespace]
function 'fixits' declared 'static', move to anonymous namespace instead
1 | static auto fixits(int x, const int *p) -> int {
| ^clang-tidy diagnostic
src/fixits.cpp:1:24 warning: [readability-identifier-length]
parameter name 'x' is too short, expected at least 3 characters
1 | static auto fixits(int x, const int *p) -> int {
| ^clang-tidy diagnostic
src/fixits.cpp:1:38 warning: [readability-identifier-length]
parameter name 'p' is too short, expected at least 3 characters
1 | static auto fixits(int x, const int *p) -> int {
| ^| @@ -0,0 +1,6 @@ | |||
| #include <cstdio> | |||
| static auto added() -> int { | |||
There was a problem hiding this comment.
clang-tidy diagnostic
src/no_final_newline.cpp:2:13 warning: [misc-use-anonymous-namespace]
function 'added' declared 'static', move to anonymous namespace instead
2 | static auto added() -> int {
| ^| @@ -0,0 +1,6 @@ | |||
| #include <cstdio> | |||
| static auto added() -> int { | |||
| int const x = 1; | |||
There was a problem hiding this comment.
clang-tidy diagnostic
src/no_final_newline.cpp:3:13 warning: [readability-identifier-length]
variable name 'x' is too short, expected at least 3 characters
3 | int const x = 1;
| ^| #include <cstdio> | ||
| static auto added() -> int { | ||
| int const x = 1; | ||
| printf("%d", x); |
There was a problem hiding this comment.
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;} | ||
| static auto edited_latin1() -> int { return 3; } |
There was a problem hiding this comment.
clang-tidy diagnostic
stress/latin1.cpp:7:13 warning: [misc-use-anonymous-namespace]
function 'edited_latin1' declared 'static', move to anonymous namespace instead
7 | static auto edited_latin1() -> int { return 3; }
| ^| int main(){ | ||
| char* p = NULL; | ||
| printf("%d\n",f(3)); return 0;} | ||
| static auto edited_space() -> int { return 1; } |
There was a problem hiding this comment.
clang-tidy diagnostic
stress/with space.cpp:6:13 warning: [misc-use-anonymous-namespace]
function 'edited_space' declared 'static', move to anonymous namespace instead
6 | static auto edited_space() -> int { return 1; }
| ^…-format (#588) <!-- claude-projects-attribution: {"github_login":"shenxianpeng"} --> Found while testing v2.0.0-rc.26 with cpp-linter-action v3 on a real PR (cpp-linter/test-cpp-linter-action#80). A PR review suggestion comes from the combined clang-format + clang-tidy patch. When no clang-tidy note fixes a line of the hunk, the change is clang-format's, but the comment is headed `### clang-tidy suggestion`. On that PR, re-indenting a comment line in `cap/many.cpp` (pure clang-format) was posted as: ````md ### clang-tidy suggestion ```suggestion // touched ``` ```` When clang-tidy didn't run on the file at all (`tidy_advice` is `None`), the same kind of suggestion had no heading. ## Changes - `TidyAdvice::get_suggestion_help()` returns `### clang-format suggestion` when no note in the hunk has a fix (instead of `### clang-tidy suggestion`). - `FileObj::get_suggestions()` uses the same heading when the file has no clang-tidy advice, instead of none. - Hunks with clang-tidy fixes keep `### clang-tidy diagnostic(s)` and the list of notes (unchanged). ## Tests - `suggestion_help_with_and_without_fixes` now checks the exact heading for a hunk without clang-tidy fixes. - `cargo nextest run -p cpp-linter --features bin`: 186 passed, 4 skipped. `cargo clippy -p cpp-linter --features bin --all-targets -- -D warnings`, `cargo fmt --check` and cspell are clean. Co-authored-by: Xianpeng Shen <3353385+shenxianpeng@users.noreply.github.com>
Temporary test PR, do not merge. Runs cpp-linter-action branch
claude/project-thread-kbgobw(v3 with cpp-linter 2.0.0rc25 = cpp-linter-rs v2.0.0-rc.26) on a fixture with a pure rename, a file without a final newline, multi-line clang-tidy fixes, more than 10 warnings and an edited Latin-1 file.Generated by Claude Code