-
-
Notifications
You must be signed in to change notification settings - Fork 1
perf: optimize use of ClangParams struct
#231
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This clones a reference (pointer) to the same `ClangParams` instance instead of cloning the instance data (when processing each source file). Some param types updated to reflect the actual life cycle of the `ClangParams` instance. Another param type change relies on internal mutability when passing around references to `FileObj` instances in an array. Added auto-trait `Debug` to `ClangVersions` struct, in case debug printing is ever needed. Removes a duplicate condition where ranges of changed lines are an empty list if `lines-changed-only` is `Off`.
WalkthroughThe pull request refactors ownership and borrowing patterns in the clang-tools module. Changes include removing mutability requirements from Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes
Possibly related PRs
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (3)
🧰 Additional context used🧠 Learnings (7)📓 Common learnings📚 Learning: 2024-11-23T06:20:11.698ZApplied to files:
📚 Learning: 2024-10-02T07:55:08.948ZApplied to files:
📚 Learning: 2025-12-11T20:19:05.142ZApplied to files:
📚 Learning: 2025-11-04T06:50:10.870ZApplied to files:
📚 Learning: 2024-11-23T14:10:31.760ZApplied to files:
📚 Learning: 2025-01-21T09:56:32.771ZApplied to files:
🧬 Code graph analysis (1)cpp-linter/src/clang_tools/clang_tidy.rs (2)
⏰ 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). (20)
🔇 Additional comments (7)
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. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #231 +/- ##
==========================================
+ Coverage 96.90% 96.93% +0.03%
==========================================
Files 14 14
Lines 3034 3033 -1
==========================================
Hits 2940 2940
+ Misses 94 93 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This clones a reference (pointer) to the same
ClangParamsinstance instead of cloning the instance data (when processing each source file).Some param types updated to reflect the actual life cycle of the
ClangParamsinstance. Another param type change relies on internal mutability when passing around references toFileObjinstances in an array.Added auto-trait
DebugtoClangVersionsstruct, in case debug printing is ever needed.Removes a duplicate condition where ranges of changed lines are an empty list if
lines-changed-onlyisOff.Summary by CodeRabbit
Refactor
Tests
✏️ Tip: You can customize this high-level summary in your review settings.