Skip to content

Conversation

shenxianpeng
Copy link
Collaborator

@shenxianpeng shenxianpeng commented Aug 31, 2025

Summary by CodeRabbit

  • New Features
    • Added support for clang-format and clang-tidy 21.1.0, including pre-commit hook compatibility.
  • Documentation
    • Updated README examples to reference version 21 for clang-format and clang-tidy.
  • Tests
    • Updated test pre-commit configuration to reference version 21 for clang-tidy.
  • Chores
    • Bumped optional tools dependency to clang-tidy 21.1.0.

@shenxianpeng shenxianpeng added the enhancement New feature or request label Aug 31, 2025
@shenxianpeng shenxianpeng changed the title feat: support clang-tidy==21.1.0 feat: support clang-tidy==21.1.0 Aug 31, 2025
@github-actions github-actions bot added the documentation Improvements or additions to documentation label Aug 31, 2025
Copy link

codecov bot commented Aug 31, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.48%. Comparing base (f5896e2) to head (f27eedd).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #100   +/-   ##
=======================================
  Coverage   94.48%   94.48%           
=======================================
  Files           3        3           
  Lines         145      145           
=======================================
  Hits          137      137           
  Misses          8        8           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link

coderabbitai bot commented Aug 31, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

Updates Clang tool version references from 20 → 21 across docs, config, supported-version lists, and tests; adds 21.1.0 to supported clang-format/clang-tidy and updates the optional clang-tidy dependency pin.

Changes

Cohort / File(s) Summary
Documentation
README.md
Bumps example pre-commit args: clang-format --version=21, clang-tidy --version=21.
Supported version lists
cpp_linter_hooks/util.py
Appends "21.1.0" to CLANG_FORMAT_VERSIONS and CLANG_TIDY_VERSIONS.
Dependency spec
pyproject.toml
Updates optional dependency pin: clang-tidy==21.1.0 (from 20.1.0).
Test/config fixtures
testing/pre-commit-config-version.yaml
In the v21 block, changes clang-tidy --version argument from 20 to 21 and removes an inline comment about v21 support.

Sequence Diagram(s)

No control-flow or feature-level behavior changes were introduced; sequence diagrams not applicable.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested labels

minor


📜 Recent 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.

📥 Commits

Reviewing files that changed from the base of the PR and between 61c0fb2 and f27eedd.

📒 Files selected for processing (1)
  • testing/pre-commit-config-version.yaml (1 hunks)
✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feature/support-clang-tidy-v21

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.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore or @coderabbit ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (2)
testing/pre-commit-config-version.yaml (1)

43-43: Remove/adjust stale comment: 21 is now supported.

The inline comment contradicts the PR goal and the rest of the repo updates that add clang-tidy 21.1.0 support.

-        args: [--checks=.clang-tidy, --version=21] # clang-tidy does not support version 21
+        args: [--checks=.clang-tidy, --version=21]
cpp_linter_hooks/util.py (1)

122-123: The tests for _resolve_version don’t include cases for input "21" mapping to "21.1.0" or for exact "21.1.0". Please add parametrized tests in tests/test_util.py under both test_resolve_version_clang_format and test_resolve_version_clang_tidy to cover:

  • user_input "21" → expected "21.1.0"
  • user_input "21.1.0" → expected "21.1.0"
📜 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.

📥 Commits

Reviewing files that changed from the base of the PR and between f5896e2 and 61c0fb2.

📒 Files selected for processing (4)
  • README.md (1 hunks)
  • cpp_linter_hooks/util.py (1 hunks)
  • pyproject.toml (1 hunks)
  • testing/pre-commit-config-version.yaml (1 hunks)
🧰 Additional context used
🧬 Code graph analysis (2)
pyproject.toml (1)
tests/test_util.py (1)
  • test_get_version_from_dependency_success (101-123)
cpp_linter_hooks/util.py (1)
tests/test_util.py (6)
  • test_version_lists_not_empty (424-429)
  • test_resolve_version_clang_tidy (195-198)
  • test_get_version_from_dependency_success (101-123)
  • test_default_versions (415-420)
  • test_get_runtime_version_clang_format (203-209)
  • test_get_runtime_version_clang_tidy (213-219)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: test (3.14)
  • GitHub Check: Run benchmarks
🔇 Additional comments (3)
pyproject.toml (1)

51-53: Confirmed 21.1.0 wheels published for all major platforms
Both clang-format and clang-tidy v21.1.0 have universal py2.py3 binaries across macOS (x86_64, arm64), Linux (manylinux / musllinux on x86_64, i686, aarch64, ppc64le, s390x, armv7l), Windows (win32, win_amd64, win_arm64) plus source sdists—pin is safe.

README.md (1)

157-161: Docs updated to v21 — LGTM.

Examples now align with the new supported version.

cpp_linter_hooks/util.py (1)

107-108: Add clang-format 21.1.0 — LGTM.

Matches the new default/tooling support.

Copy link

codspeed-hq bot commented Aug 31, 2025

CodSpeed Performance Report

Merging #100 will degrade performances by 10.92%

Comparing feature/support-clang-tidy-v21 (f27eedd) with main (f5896e2)

Summary

⚡ 2 improvements
❌ 1 regressions
✅ 70 untouched benchmarks

⚠️ Please fix the performance issues or acknowledge them on CodSpeed.

Benchmarks breakdown

Benchmark BASE HEAD Change
test_run_clang_tidy_invalid[args6-1] 852 µs 742.2 µs +14.79%
test_run_clang_tidy_valid[args6-1] 930.6 µs 801.5 µs +16.12%
test_ensure_installed[clang-tidy-None] 1.2 ms 1.3 ms -10.92%

@shenxianpeng shenxianpeng merged commit 7b05e57 into main Aug 31, 2025
10 of 11 checks passed
@shenxianpeng shenxianpeng deleted the feature/support-clang-tidy-v21 branch August 31, 2025 17:52
Copy link

@shenxianpeng shenxianpeng removed the documentation Improvements or additions to documentation label Sep 1, 2025
@shenxianpeng shenxianpeng changed the title feat: support clang-tidy==21.1.0 feat: support clang-tidy v21 Sep 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant