Skip to content

fix(hook): rewrite wc commands to rtk wc - #884

Merged
FlorianBruniaux merged 1 commit into
rtk-ai:developfrom
manulqwerty:fix/hook-rewrite-wc
Mar 30, 2026
Merged

FlorianBruniaux merged 1 commit into
rtk-ai:developfrom
manulqwerty:fix/hook-rewrite-wc

Conversation

@manulqwerty

@manulqwerty manulqwerty commented Mar 27, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • rewrite wc commands through the hook by removing "wc " from IGNORED_PREFIXES
  • add wc to the discover/rewrite registry so wc ... becomes rtk wc ...
  • cover the regression with classification and rewrite tests, and document it in the changelog

Test plan

  • cargo fmt --all && cargo clippy --all-targets && cargo test
  • Manual testing: rtk <command> output inspected
  • cargo fmt --all --check
  • cargo test test_classify_wc_supported -- --nocapture
  • cargo test test_rewrite_wc -- --nocapture
  • Manual hook test (Copilot VS Code payload): wc -l src/main.rs rewrites to rtk wc -l src/main.rs
  • Manual hook test (Gemini payload): wc -l src/main.rs rewrites to rtk wc -l src/main.rs
  • Manual output check: wc -l src/main.rs -> 2643 src/main.rs, rtk wc -l src/main.rs -> 2643

Clippy currently fails on pre-existing unrelated warnings in src/gh_cmd.rs and src/git.rs on this branch baseline, so the full cargo fmt --all && cargo clippy --all-targets && cargo test box is left unchecked.

@CLAassistant

CLAassistant commented Mar 27, 2026 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@FlorianBruniaux
FlorianBruniaux merged commit c54afe3 into rtk-ai:develop Mar 30, 2026
12 checks passed
aeppling added a commit that referenced this pull request Mar 30, 2026
Aligns with PR #884 (wc rewrite support) already on develop.
thehoff pushed a commit to thehoff/contextcrawler that referenced this pull request May 14, 2026
Aligns with PR rtk-ai#884 (wc rewrite support) already on develop.
thehoff pushed a commit to thehoff/contextcrawler that referenced this pull request May 14, 2026
thehoff pushed a commit to thehoff/contextcrawler that referenced this pull request May 14, 2026
Aligns with PR rtk-ai#884 (wc rewrite support) already on develop.
thehoff pushed a commit to thehoff/contextcrawler that referenced this pull request May 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants