rtk-ai/rtk

[rewrite] dotnet test|restore|format should auto-rewrite to rtk dotnet

Open

#1,830 创建于 2026年5月11日

在 GitHub 查看
 (1 评论) (0 反应) (0 负责人)Rust (2,914 fork)batch import
area:clibuggood first issuepriority:medium

仓库指标

Star
 (48,085 star)
PR 合并指标
 (平均合并 11天 1小时) (30 天内合并 45 个 PR)

描述

Summary

The proxies rtk dotnet test, rtk dotnet restore, and rtk dotnet format already exist (see rtk dotnet --help), but rtk rewrite only recognises dotnet build. As a result, the Claude Code hook silently passes through the other three subcommands.

Reproduction (rtk 0.39.0)

$ rtk rewrite "dotnet test"       ; echo $?
1
$ rtk rewrite "dotnet restore"    ; echo $?
1
$ rtk rewrite "dotnet format"     ; echo $?
1
$ rtk rewrite "dotnet build"      ; echo $?   # works
rtk dotnet build
0

Impact

rtk discover on a 30-day, 18k-command Claude Code history shows dotnet test = 263 calls and dotnet restore = 66 calls. None of them benefit from the existing proxy because the rewrite registry skips them.

Proposed fix

Extend the rewrite rule for dotnet in src/discover/registry.rs so it matches the subcommand set {build, test, restore, format} instead of only build. The output filter already handles all four — this is purely a routing fix.

贡献者指南