Harden CLI with error handling, overwrite protection, and tests#36
Conversation
|
Warning Review limit reached
Your plan currently allows 2 reviews/hour. Refill in 11 minutes and 7 seconds. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more review capacity refills, 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 have higher rate limits than trial, open-source, and free plans. In all cases, review capacity refills continuously over time. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
✨ 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 |
- Wrap analysis calls in try/except to continue on errors - Add output file write error handling - Add --force flag for output file overwrite protection - Add KeyboardInterrupt handler for clean Ctrl+C exit - Refactor analyze_file into smaller focused functions - Add comprehensive CLI test suite Co-authored-by: Cursor <cursoragent@cursor.com>
71ad38d to
35a9aa4
Compare
|



Summary
try/exceptso failures on one file don't stop processing of remaining filesOSError,PermissionError)--forceflag for output file overwrite protection (existing files are not overwritten without it)KeyboardInterrupthandler for clean Ctrl+C exit (exit code 130)analyze_fileinto smaller focused functions:_validate_file,_write_output,analyze_file