Repository navigation
feat: add gitignore-aware smart scan (#13) - #14
Merged
Merged
Conversation
Walk .gitignore files during traversal and surface any matching directories as additional deletion candidates (Language::GitIgnore, labelled "gitignore" in the UI). Language-scanner results take precedence — if a dir is found by both, it appears once under the language rule. - Add `ignore = "0.4"` dependency for correct gitignore pattern parsing - Add `Language::GitIgnore` variant and `detect_gitignore_artifacts()` - Thread `RefCell<HashSet<PathBuf>>` through `scan()` so gitignore-matched dirs are pruned from WalkDir traversal the same as hardcoded artifact dirs - Add language/source label column to every list row (Rust, Node.js, gitignore, etc.) — the field was stored but never rendered before - Denylist: .git, .vscode, .idea, .github are never surfaced - 6 new tests including a scan-level dedup integration test (51 total) - Update README with gitignore scan section and missing `a` keybinding Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
.gitignore-aware pass — walks every.gitignoreencountered and surfaces matching directories that exist on disk (e.g.dist/,out/,.cache/,.next/)Rust,Node.js,gitignore, etc.) — thelanguagefield was stored but never rendered beforeChanges
Cargo.toml— addignore = "0.4"for correct gitignore pattern parsing (handles negations,**globs, directory-specific patterns)src/scanner.rs—Language::GitIgnorevariant;GITIGNORE_DENYLIST(.git,.vscode,.idea,.github);detect_gitignore_artifacts();scan()usesRefCell<HashSet<PathBuf>>shared withfilter_entryso gitignore-matched dirs are pruned from WalkDir traversal just like hardcoded onessrc/render.rs— language label span{:<12}inDarkGray; parent column trimmed 45→33 chars to keep row width stableREADME.md— new "Gitignore-aware scan" section; missingakeybinding addedTest plan
cargo nextest run— 51/51 pass (6 new tests)scan_deduplicates_lang_and_gitignore_for_same_dirintegration test: a Rusttarget/also listed in.gitignoreappears exactly onceCloses #13
🤖 Generated with Claude Code