Skip to content

test: rc.26 PR fixture (action v3 + cpp-linter 2.0.0rc25) - #80

Open
shenxianpeng wants to merge 2 commits into
claude/project-thread-kbgobwfrom
e2e/rc26-new-44035442559
Open

shenxianpeng wants to merge 2 commits into
claude/project-thread-kbgobwfrom
e2e/rc26-new-44035442559

Conversation

@shenxianpeng

Copy link
Copy Markdown
Member

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

github-actions[bot]

This comment was marked as outdated.

@github-actions

github-actions Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

Cpp-Linter Report ⚠️

Some files did not pass the configured checks!

clang-tidy (v21.1.8) reports: 8 concern(s)
  • src/fixits.cpp

    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 {
          |             ^
  • src/fixits.cpp

    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 {
          |                        ^
  • src/fixits.cpp

    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 {
          |                                      ^
  • src/no_final_newline.cpp

    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 {
          |             ^
  • src/no_final_newline.cpp

    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;
          |             ^
  • src/no_final_newline.cpp

    src/no_final_newline.cpp:4:3: warning: [cppcoreguidelines-pro-type-vararg]

    do not call c-style vararg functions

        4 |   printf("%d", x);
          |   ^
  • stress/latin1.cpp

    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; }
          |             ^
  • stress/with space.cpp

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

✨ 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-format v21.1.8

Used clang-tidy v21.1.8


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

Comment thread src/fixits.cpp
@@ -0,0 +1,9 @@
static auto fixits(int x, const int *p) -> int {

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 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 {
      |                                      ^

Comment thread src/no_final_newline.cpp
@@ -0,0 +1,6 @@
#include <cstdio>
static auto added() -> int {

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 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 {
      |             ^

Comment thread src/no_final_newline.cpp
@@ -0,0 +1,6 @@
#include <cstdio>
static auto added() -> int {
int const x = 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.

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

Comment thread src/no_final_newline.cpp
#include <cstdio>
static auto added() -> int {
int const x = 1;
printf("%d", x);

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 diagnostic

src/no_final_newline.cpp:4:3 warning: [cppcoreguidelines-pro-type-vararg]

do not call c-style vararg functions

    4 |   printf("%d", x);
      |   ^

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

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

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

2bndy5 pushed a commit to cpp-linter/cpp-linter-rs that referenced this pull request Nov 17, 2026
…-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>
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