Conversation
Signed-off-by: Grant Ramsay <seapagan@gmail.com>
Signed-off-by: Grant Ramsay <seapagan@gmail.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
✅ Files skipped from review due to trivial changes (1)
📝 WalkthroughWalkthroughAdds a Changes
Sequence DiagramsequenceDiagram
participant User as User (CLI)
participant Parser as CLI Parser
participant Params as Params Merger
participant FileProc as File Processor
participant Cache as GitignoreCache
participant Matcher as GitignoreMatcher
participant Display as ANSI Renderer
User->>Parser: provide paths + `-I` flag
Parser->>Params: parse flags
Params->>FileProc: pass merged params (gitignore=true)
FileProc->>Cache: init / request matcher for scope
Cache->>Matcher: lazily build matcher (worktree detection, collect ignore files)
FileProc->>Cache: is_ignored(path, is_dir)?
Cache->>Matcher: evaluate path against matchers
Matcher-->>Cache: return match result (Ignored / Whitelist / None)
Cache-->>FileProc: ignored = true/false
alt ignored
FileProc->>Display: wrap name with dim ANSI
else visible
FileProc->>Display: render normally
end
Display-->>User: output line
Estimated code review effort🎯 4 (Complex) | ⏱️ ~50 minutes Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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 |
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 46 |
| Duplication | 16 |
TIP This summary will be updated as you push new changes. Give us feedback
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@src/utils/gitignore.rs`:
- Around line 67-78: The loop currently uses
gitignore_matcher.matched_path_or_any_parents(relative_path, is_dir) but calls
matched(relative_path, is_dir) on git_exclude_matcher and git_global_matcher,
causing parent-directory patterns (e.g. "build/") to miss files; change the
calls on git_exclude_matcher and git_global_matcher to use
matched_path_or_any_parents(relative_path, is_dir) as well (preserving the Match
enum handling and is_dir argument) so all three sources consistently detect
patterns that apply to parent directories.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 39812e25-5eb4-4576-a928-066c1a3c02b4
⛔ Files ignored due to path filters (1)
Cargo.lockis excluded by!**/*.lock
📒 Files selected for processing (10)
Cargo.tomlTODO.mddocs/src/config.mddocs/src/usage.mdsrc/cli.rssrc/structs.rssrc/utils.rssrc/utils/file.rssrc/utils/gitignore.rstests/integration.rs
Signed-off-by: Grant Ramsay <seapagan@gmail.com>
Summary
Add an opt-in
-I/--gitignorefeature that dims entries Git considers ignored instead of changing which entries are listed.What changed
ignorecrate to resolve ignored paths from the active Git context.gitignorefiles,.git/info/exclude, and the configured global excludes fileTODO.mdthat traversal should be revisited if recursion or tree output later moves to theignorewalkerWhy
This makes it easier to see which files are ignored by Git without hiding them or changing the existing listing behavior, while keeping the feature opt-in and aligning the highlighted state with Git's actual ignore rules.
Summary by CodeRabbit
New Features
Documentation
Tests