Repository navigation
[DO NOT MERGE] cpp-linter v2 preview screenshots - #70
shenxianpeng wants to merge 3 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
| namespace { | ||
| bool hasName(const char* name) | ||
| { | ||
| return name; |
There was a problem hiding this comment.
clang-tidy diagnostic(s)
- implicit conversion 'const char *' -> 'bool' [readability-implicit-bool-conversion]
| return name; | |
| return name != nullptr; |
| printf("Hello world!\n"); | ||
|
|
||
| return 0; | ||
| return hasName("demo") ? 0 : 42; |
There was a problem hiding this comment.
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;
| ^…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>
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.