Skip to content

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

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

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

Conversation

@manulqwerty
Copy link
Copy Markdown
Contributor

@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.

@FlorianBruniaux FlorianBruniaux merged commit c54afe3 into rtk-ai:develop Mar 30, 2026
12 checks passed
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