[config] filters.ignore_dirs / ignore_files are declared and documented but never read (ls/tree use hardcoded NOISE_DIRS)
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 81.1k
- Forks
- 5.1k
- Avg merge
- 4d 21h
- Merged PRs (30d)
- 35
Description
Summary
[filters].ignore_dirs and [filters].ignore_files in config.toml are parsed and displayed by rtk config, but no code path consumes them — editing them changes nothing in any subcommand.
Evidence (v0.44.2, tag commit 700bdde3343299ea06bbca18dc6670a80c88b289)
- Declared at
src/core/config.rs:92-108(FilterConfig.ignore_dirs/ignore_files+ defaults). A repo-wide grep finds zero consumers — the only hits areconfig.rsitself and docs. rtk lsuses the hardcodedNOISE_DIRSconst instead:src/cmds/system/constants.rs:1-27, applied atsrc/cmds/system/ls.rs:266.rtk treejoins the same hardcoded list as its exclusion pattern:src/cmds/system/tree.rs:31.rtk finduses theignorecrate with gitignore semantics (src/cmds/system/find_cmd.rs:221-223) — no config consultation.rtk grep/rtk rgdelegate to the underlying search engine with user args (src/cmds/system/search.rs) — no dir/file ignoring from config.
Behavioral confirmation (rtk 0.44.2, Windows 11)
Added a canary directory name to ignore_dirs and confirmed it loaded via rtk config:
rtk lsstill lists the canary dir — while correctly hiding a plantednode_modules/, proving the hardcoded list (not config) is what's active.rtk grep -r <pattern> .andrtk find . -name <file>both surface files inside the canary dir.
Docs affected
Both document these keys as functional:
docs/usage/FEATURES.md:1261docs/guide/getting-started/configuration.md:38
Related
Same declared-but-never-read pattern as #3229 (grep_max_results) and #2437 (status_max_files / status_max_untracked). For contrast, grep_max_per_file (search.rs:634) and passthrough_max_chars (parser/mod.rs:104-107 + tool modules) are wired up — this report covers only the dead keys and their docs.
Suggested fix
Either merge the config values over the NOISE_DIRS defaults in the ls/tree/walk paths, or drop the keys from the default config template and docs until implemented — the current state silently ignores user intent.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with src/core/config.rs:92-108 and trace the existing filter values into src/cmds/system/ls.rs:266 and src/cmds/system/tree.rs:31, comparing them with NOISE_DIRS in constants.rs. Review find_cmd.rs:221-223 and search.rs to determine the intended scope, then run the documented Windows behavior checks. Done means the configuration is either honored by the relevant commands with tests and updated docs, or the unused keys are removed from the template and documentation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100