Repository navigation
Conversation
KuSh
force-pushed
the
chore/standardize-filter-fn-names
branch
2 times, most recently
from
September 7, 2026 23:29
e2af7a2 to
6190284
Compare
KuSh
marked this pull request as ready for review
September 7, 2026 23:31
This was referenced Sep 9, 2026
KuSh
force-pushed
the
chore/standardize-filter-fn-names
branch
3 times, most recently
from
September 17, 2026 23:04
87cf737 to
c83f999
Compare
KuSh
force-pushed
the
chore/standardize-filter-fn-names
branch
from
October 7, 2026 16:48
c83f999 to
679922a
Compare
This was referenced Oct 17, 2026
Filter functions repeated their own module name, so every cross-module
call read as mypy_cmd::filter_mypy_output. The module path already
supplies the tool name; .claude/rules/rust-patterns.md has prescribed
plain filter_output as the module-structure convention all along, so
this aligns the code with the documented house style rather than
introducing a new one.
bun_cmd filter_bun_pkg -> filter_pkg
filter_bun_pm_ls_json -> filter_pm_ls_json
filter_bun_pm_ls_text -> filter_pm_ls_text
filter_bun_pm_ls -> filter_pm_ls
filter_bun_pm_ls_tree -> filter_pm_ls_tree
deno_cmd filter_deno_output -> filter_output
prettier_cmd filter_prettier_output -> filter_output
artisan_cmd filter_artisan_output -> filter_output
filter_artisan_test_output-> filter_test_output
mypy_cmd filter_mypy_output -> filter_output
ruff_cmd filter_ruff_check_json -> filter_check_json
filter_ruff_format -> filter_format
sqlfluff_cmd filter_sqlfluff_lint_json -> filter_lint_json
json_cmd filter_json_compact -> filter_compact
filter_json_string -> filter_schema
Test names follow their subject where they name it, e.g.
test_filter_deno_output_empty -> test_filter_output_empty.
Pure rename: no behaviour change, and the user-facing `rtk pipe -f`
filter names ("mypy", "ruff-check", "sqlfluff-lint", ...) are untouched.
pipe_cmd::test_resolve_filter_ruff_format therefore keeps its name --
it asserts resolve_filter("ruff-format"), the user-facing string rather
than the function.
Three judgement calls worth a reviewer's eye:
- bun_cmd::run_bunx is left alone; bunx is a distinct tool from bun,
not stutter.
- bun_cmd's test_filter_bun_install_* keep their names. They name the
output being filtered, `bun install`, rather than the function under
test, which is filter_pkg; there is no filter_install to follow.
- json_cmd::filter_json_string -> filter_schema is a semantic fix, not
just destuttering: it returns a schema representation (types only, no
values), so the old name described the input rather than the output.
src/cmds/README.md taught the stuttering pattern in its example and its
"Adding a New Command Filter" checklist, which would have pulled the
convention straight back; both are updated and the naming rule is now
stated explicitly.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
KuSh
force-pushed
the
chore/standardize-filter-fn-names
branch
from
October 21, 2026 00:23
679922a to
080fe73
Compare
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.
What
Filter functions repeated their own module name, so every cross-module call read as
mypy_cmd::filter_mypy_output. The module path already supplies the tool name.This is not a new convention:
.claude/rules/rust-patterns.mdhas prescribed plainfilter_outputin its "Module Structure" section all along (lines 231-232). The code had drifted from its own documented house style; this aligns them.bun_cmdfilter_bun_pkgfilter_pkgfilter_bun_pm_ls_jsonfilter_pm_ls_jsonfilter_bun_pm_ls_textfilter_pm_ls_textfilter_bun_pm_lsfilter_pm_lsfilter_bun_pm_ls_treefilter_pm_ls_treedeno_cmdfilter_deno_outputfilter_outputprettier_cmdfilter_prettier_outputfilter_outputartisan_cmdfilter_artisan_outputfilter_outputfilter_artisan_test_outputfilter_test_outputmypy_cmdfilter_mypy_outputfilter_outputruff_cmdfilter_ruff_check_jsonfilter_check_jsonfilter_ruff_formatfilter_formatsqlfluff_cmdfilter_sqlfluff_lint_jsonfilter_lint_jsonjson_cmdfilter_json_compactfilter_compactfilter_json_stringfilter_schemaReads better where it matters most — the
pipe_cmdregistry:Not a behaviour change
Pure rename. The user-facing
rtk pipe -ffilter names ("mypy","ruff-check","sqlfluff-lint", …) are unchanged, so no CLI surface moves.cargo fmt --all --check,cargo clippy --all-targetsandcargo test --allall pass.Two judgement calls
bun_cmd::run_bunxleft alone.bunxis a distinct tool frombun, so that is not stutter. Flagging it because a regex-driven pass would have renamed it.json_cmd::filter_json_string→filter_schemais a semantic fix, not just destuttering. It returns a schema representation (types only, no values), so the old name described its input rather than its output. Easy to drop from this PR if you'd rather keep the change purely mechanical.Doc drift
src/cmds/README.mdtaught the stuttering pattern in both its worked example and its "Adding a New Command Filter" checklist, which would have pulled the convention straight back on the next filter. Both are updated, and the naming rule is now stated explicitly rather than left implicit.🤖 Generated with Claude Code