Skip to content

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

Open
manulqwerty wants to merge 1 commit intortk-ai:developfrom
manulqwerty:fix/hook-rewrite-wc
Open

fix(hook): rewrite wc commands to rtk wc#884
manulqwerty wants to merge 1 commit intortk-ai:developfrom
manulqwerty:fix/hook-rewrite-wc

Conversation

@manulqwerty
Copy link
Copy Markdown

@manulqwerty manulqwerty commented Mar 27, 2026

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
Copy link
Copy Markdown

CLAassistant commented Mar 27, 2026

CLA assistant check
All committers have signed the CLA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants