docs: Upgrade clang-format and clang-tidy to version 21#102
docs: Upgrade clang-format and clang-tidy to version 21#102shenxianpeng merged 1 commit intomainfrom
Conversation
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #102 +/- ##
=======================================
Coverage 94.48% 94.48%
=======================================
Files 3 3
Lines 145 145
=======================================
Hits 137 137
Misses 8 8 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
WalkthroughDocumentation updates in README.md adjust example references from clang tool version 18 to 21 for clang-format and clang-tidy, including a verbose output example. No code or functionality changes. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Possibly related PRs
✨ Finishing Touches🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
README.md (1)
193-196: Correct table: loading style config is via --style=file, not --versionThis row is misleading; --version selects tool version, not style source.
Apply this diff:
-| Loads style configuration | ✅ via `--version` | ✅ (default behavior) | +| Loads style configuration | ✅ via `--style=file` | ✅ (default behavior) |
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
💡 Knowledge Base configuration:
- MCP integration is disabled by default for public repositories
- Jira integration is disabled by default for public repositories
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (1)
README.md(2 hunks)
🔇 Additional comments (2)
README.md (2)
183-183: LGTM on verbose exampleThe --verbose usage with version pin looks correct and consistent with the rest of the README.
59-70: All checks passed for LLVM 21 support
PyPI offers clang-format and clang-tidy 21.1.0 wheels across major platforms, and v1.1.0 of the hook defines an --version argument that’s correctly passed to ensure_installed.
| args: [--style=file, --version=21] # Specifies version | ||
| - id: clang-tidy | ||
| args: [--checks=.clang-tidy, --version=18] # Specifies version | ||
| args: [--checks=.clang-tidy, --version=21] # Specifies version | ||
| ``` |
There was a problem hiding this comment.
Fix incorrect clang-tidy flag: use --config-file, not --checks=.clang-tidy
--checks=.clang-tidy is invalid; to load from a .clang-tidy file, use --config-file=.clang-tidy (or rely on default discovery).
Apply this diff:
- id: clang-tidy
- args: [--checks=.clang-tidy, --version=21] # Specifies version
+ args: [--config-file=.clang-tidy, --version=21] # Specifies version and loads config from file📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| args: [--style=file, --version=21] # Specifies version | |
| - id: clang-tidy | |
| args: [--checks=.clang-tidy, --version=18] # Specifies version | |
| args: [--checks=.clang-tidy, --version=21] # Specifies version | |
| ``` | |
| args: [--style=file, --version=21] # Specifies version | |
| - id: clang-tidy | |
| args: [--config-file=.clang-tidy, --version=21] # Specifies version and loads config from file |
🤖 Prompt for AI Agents
In README.md around lines 67 to 70, the clang-tidy invocation uses an invalid
flag `--checks=.clang-tidy`; replace that flag with `--config-file=.clang-tidy`
(or remove the explicit flag to rely on clang-tidy's default discovery) so the
tool loads configuration from the .clang-tidy file; update the example args
accordingly and ensure the comment still notes the version if needed.



Summary by CodeRabbit