rtk-ai / rtk-ai/rtk

[config] filters.ignore_dirs / ignore_files are declared and documented but never read (ls/tree use hardcoded NOISE_DIRS)

Open
#3,386 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area:config bug good first issue priority:medium
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 are config.rs itself and docs.
  • rtk ls uses the hardcoded NOISE_DIRS const instead: src/cmds/system/constants.rs:1-27, applied at src/cmds/system/ls.rs:266.
  • rtk tree joins the same hardcoded list as its exclusion pattern: src/cmds/system/tree.rs:31.
  • rtk find uses the ignore crate with gitignore semantics (src/cmds/system/find_cmd.rs:221-223) — no config consultation.
  • rtk grep / rtk rg delegate 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 ls still lists the canary dir — while correctly hiding a planted node_modules/, proving the hardcoded list (not config) is what's active.
  • rtk grep -r <pattern> . and rtk find . -name <file> both surface files inside the canary dir.

Docs affected

Both document these keys as functional:

  • docs/usage/FEATURES.md:1261
  • docs/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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.