Commit 6cd3823
fix(bugs): print empty-results hint when --vulns alone yields no matches (#264)
## Summary
Follow-up to #254. That PR introduced `empty_filter_hint` with a
dedicated *"No security vulnerabilities found with the current
filters."* branch — and a unit test
(`empty_filter_hint_vulns_flag_with_empty_prefilter`) asserting that
exact message — but only wired the helper into the `--introduced-by`
branch of the handler. When a user runs `detail bugs list --vulns`
without an author filter and zero vulnerabilities match, the helper is
never reached: they just see an empty table with no explanation.
Add the matching early return for the `--vulns`-alone case: if the
post-`--vulns` filter is empty and `--introduced-by` wasn't given, print
the hint and return.
## Test plan
- [x] `cargo test --lib bugs::` — 35 pass
- [x] `cargo clippy -- -D warnings` clean
- [x] `cargo fmt --check` clean
- [ ] Manual: `detail bugs list <repo-without-vulns> --vulns` now prints
"No security vulnerabilities found with the current filters." instead of
an empty table
Fixes #259.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
<!-- devin-review-badge-begin -->
---
<a href="https://app.devin.ai/review/usedetail/cli/pull/264"
target="_blank">
<picture>
<source media="(prefers-color-scheme: dark)"
srcset="https://static.devin.ai/assets/gh-open-in-devin-review-dark.svg?v=1">
<img
src="https://static.devin.ai/assets/gh-open-in-devin-review-light.svg?v=1"
alt="Open in Devin Review">
</picture>
</a>
<!-- devin-review-badge-end -->
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 048aa32 commit 6cd3823
1 file changed
Lines changed: 10 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
337 | 337 | | |
338 | 338 | | |
339 | 339 | | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
340 | 350 | | |
341 | 351 | | |
342 | 352 | | |
| |||
0 commit comments