Skip to content

[DO NOT MERGE] cpp-linter v2 preview screenshots - #70

Closed
shenxianpeng wants to merge 3 commits into
masterfrom
claude/project-thread-cgl0vq
Closed

shenxianpeng wants to merge 3 commits into
masterfrom
claude/project-thread-cgl0vq

Conversation

@shenxianpeng

@shenxianpeng shenxianpeng commented Nov 9, 2026 •

Copy link
Copy Markdown
Member

Temporary PR. It runs cpp-linter v2 (cpp-linter-rs v2.0.0-rc.25) so we can take new light and dark screenshots of the thread comment, PR review, annotations and step summary for the cpp-linter-rs README (cpp-linter/cpp-linter-rs#559).

Close without merging once the screenshots are taken.

@github-actions

github-actions Bot commented Nov 9, 2026 •

Copy link
Copy Markdown

Cpp-Linter Report ⚠️

Some files did not pass the configured checks!

clang-format (v21.1.8) reports: 1 file(s) not formatted
  • src/demo.cpp (1 line)
clang-tidy (v21.1.8) reports: 2 concern(s)
  • src/demo.cpp

    src/demo.cpp:12:13: warning: [readability-implicit-bool-conversion]
    ⚡ auto-fix included in generated patch1

    implicit conversion 'const char *' -> 'bool'

       12 |     return  name;
          |             ^   
          |                  != nullptr
  • src/demo.cpp

    src/demo.cpp:23:34: warning: [readability-magic-numbers]

    42 is a magic number; consider replacing it with a named constant

       23 |     return hasName("demo") ? 0 : 42;
          |                                  ^

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

Footnotes

  1. Cpp-linter generates a patch with fixes from both clang-tidy and clang-format. In the CI workflow, the patch can be found using cpp-linter's output fix-patch-path. ↩

@shenxianpeng
shenxianpeng marked this pull request as ready for review November 9, 2026 20:44
github-actions[bot]

This comment was marked as outdated.

@github-actions
github-actions Bot dismissed their stale review November 9, 2026 20:47

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

Used clang-format v21.1.8

Used clang-tidy v21.1.8


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

Comment thread src/demo.cpp
namespace {
bool hasName(const char* name)
{
return name;

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(s)

Suggested change
return name;
return name != nullptr;

Comment thread src/demo.cpp
printf("Hello world!\n");

return 0;
return hasName("demo") ? 0 : 42;

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/demo.cpp:23:34 warning: [readability-magic-numbers]

42 is a magic number; consider replacing it with a named constant

   23 |     return hasName("demo") ? 0 : 42;
      |                                  ^

2bndy5 pushed a commit to cpp-linter/cpp-linter-rs that referenced this pull request Nov 9, 2026
…562)

<!-- claude-projects-attribution: {"github_login":"shenxianpeng"} -->

Resolves #559.

The README previews were screenshots of cpp-linter v1. This replaces
them with screenshots of a real v2 run, each in a light and a dark
variant.

## What changed

- **Thread comment**: the v2 report, with the clang-format section
expanded to show the per-file line count.
- **PR review**: one review with two comments, as suggested in #559:
1. a suggestion with clang-tidy's rationale (the suggestion also carries
a clang-format fix on the same line),
  2. a clang-tidy rationale without a suggestion.

The separate "Only clang-tidy" / "Only clang-format" sections are gone.
- **Annotations**: one screenshot of an annotation in the PR's changed
files, and one of the annotations list in the workflow run summary. v2's
clang-format notice has no line number, so GitHub shows it in the run
summary only, not in the diff. That's why the old "clang-format
annotations" / "clang-tidy annotations" split no longer fits.
- **Step summary**: the light and dark screenshots 2bndy5 took of the
same run (GitHub only shows job summaries to signed-in users).

Light/dark switching uses the `#gh-light-mode-only` /
`#gh-dark-mode-only` fragments. GitHub supports them, and so does
Material for MkDocs (it follows the docs site's palette toggle), so the
same reference links work in `README.md` and in `docs/docs/index.md`,
which includes it. I checked both: the README on this branch on
github.com, and a local `mkdocs build`, show only the matching image in
each theme.

## How the screenshots were made

They come from cpp-linter/test-cpp-linter-action#70 (a temporary PR, to
be closed): `cpp-linter` v2.0.0-rc.25 on `ubuntu-24.04` with clang
21.1.8, the repo's `.clang-tidy` (`--tidy-checks=""`), and
`--thread-comments=update --pr-review=true --file-annotations=true
--step-summary=true`. They were captured with Playwright at 2x scale and
reduced to 256 colors (about 14–93 KB each).

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

<!-- coderabbit-ai-generated:v1 -->

## Summary by CodeRabbit

* **Documentation**
* Updated README and documentation imagery with light- and dark-mode
examples for annotations, annotation summaries, thread comments, pull
request reviews, and step summaries.
* Revised annotation examples to show annotations in changed files and
workflow run summaries.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

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