Report a failed download in run_main's return value - #194
Conversation
📝 WalkthroughWalkthrough
ChangesAnalysis status handling
Estimated code review effort: 2 (Simple) | ~10 minutes Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 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 |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
src/fosslight_scanner/fosslight_scanner.py (1)
530-533: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winAdd regression coverage for failed downloads.
When
download_sourcereturnsFalse, assert thatrun_mainreturnsFalseand does not callrun_scanner. This protects the new return-value contract.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/fosslight_scanner/fosslight_scanner.py` around lines 530 - 533, Add regression coverage for the failed-download branch in run_main: mock download_source to return False, assert run_main returns False, and verify run_scanner is not called. Use the existing test fixtures and mocking conventions without changing the production flow.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@src/fosslight_scanner/fosslight_scanner.py`:
- Around line 530-533: Add regression coverage for the failed-download branch in
run_main: mock download_source to return False, assert run_main returns False,
and verify run_scanner is not called. Use the existing test fixtures and mocking
conventions without changing the production flow.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: 8685eeb7-622c-481b-befb-4cc45f426483
📒 Files selected for processing (1)
src/fosslight_scanner/fosslight_scanner.py
Summary by CodeRabbit