feat: get clang-tidy fixes regardless of tidy-review value#354
Conversation
This is another step toward presenting auto-fixed patches for consumers to commit/push.
This basically does what `--tidy-review` conditionally did before. But now it is done every time clang-tidy is invoked.
Even if not using the PR review feature, this allows us to boast if a clang-tidy note/warning can be auto-fixed. For example, the new thread comment may contain the following for something that can be auto-fixed:
- **src/demo/demo.cpp:10:3** note: [readability]
:zap: auto-fix available
> <rationale>
{concerned code snippet if any}
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #354 +/- ##
==========================================
+ Coverage 92.74% 92.83% +0.09%
==========================================
Files 22 23 +1
Lines 3403 3461 +58
==========================================
+ Hits 3156 3213 +57
- Misses 247 248 +1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
Warning Review limit reached
More reviews will be available in 35 minutes and 54 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more credits in the billing tab to continue. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (4)
WalkthroughTidyAdvice.patched is now a PathBuf to a cached .tidy file. parse_tidy_output returns a Vec. run_clang_tidy always runs clang-tidy --fix-errors, caches patched files under CACHE_DIR, restores repo files via a RestoreOnDrop guard, and downstream code reads patched content from disk; UI shows auto-fix markers. ChangesTidyAdvice File-Caching Refactor
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
try to restore scanned file's contents upon error propagation. add more test isolation to prevent race conditions with shared test asserts
This is another step toward presenting auto-fixed patches for consumers to commit/push.
This basically does what
--tidy-reviewconditionally did before. But now it is done every time clang-tidy is invoked.Even if not using the PR review feature, this allows us to boast if a clang-tidy note/warning can be auto-fixed. For example, the new thread comment may contain the following for something that can be auto-fixed:
src/demo/demo.cpp:10:3 note: [readability]
⚡ auto-fix available
{concerned code snippet if any}
Summary by CodeRabbit
New Features
Bug Fixes
Tests
Documentation