Commit f8bc08e
committed
fix(discover): add cargo nextest to rewrite rule
`rtk cargo nextest` is implemented in src/cmds/rust/cargo_cmd.rs with
dedicated filtered output, but the discover rewrite pattern only matched
`cargo (build|test|clippy|check|fmt|install)`. The Claude Code hook
therefore never rewrote `cargo nextest` calls, so users invoking nextest
directly received raw output instead of RTK's compact summary.
Changes:
- Add `nextest` to the cargo pattern alternation in src/discover/rules.rs
- Register `("nextest", 90.0)` in subcmd_savings (matches `test`, since
both filters collapse to a one-line pass/fail summary)
- Add classify + rewrite + with-args tests in src/discover/registry.rs
- Update `test_registry_covers_all_cargo_subcommands` to include
`install` and `nextest` (the loop had drifted out of sync with the
CargoCommand enum when `Install` was added previously)
Closes #20461 parent 5a149a7 commit f8bc08e
2 files changed
Lines changed: 41 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1100 | 1100 | | |
1101 | 1101 | | |
1102 | 1102 | | |
| 1103 | + | |
| 1104 | + | |
| 1105 | + | |
| 1106 | + | |
| 1107 | + | |
| 1108 | + | |
| 1109 | + | |
| 1110 | + | |
| 1111 | + | |
| 1112 | + | |
| 1113 | + | |
| 1114 | + | |
| 1115 | + | |
| 1116 | + | |
| 1117 | + | |
| 1118 | + | |
| 1119 | + | |
| 1120 | + | |
| 1121 | + | |
| 1122 | + | |
| 1123 | + | |
| 1124 | + | |
| 1125 | + | |
| 1126 | + | |
| 1127 | + | |
| 1128 | + | |
| 1129 | + | |
| 1130 | + | |
| 1131 | + | |
| 1132 | + | |
| 1133 | + | |
| 1134 | + | |
| 1135 | + | |
| 1136 | + | |
1103 | 1137 | | |
1104 | 1138 | | |
1105 | | - | |
1106 | | - | |
1107 | | - | |
| 1139 | + | |
| 1140 | + | |
| 1141 | + | |
| 1142 | + | |
| 1143 | + | |
1108 | 1144 | | |
1109 | 1145 | | |
1110 | 1146 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | | - | |
| 47 | + | |
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
52 | | - | |
| 52 | + | |
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
| |||
0 commit comments