rtk-ai/rtk
在 GitHub 查看feat: comprehensive Swift ecosystem support (test, package, run, lint)
Open
#848 建立於 2026年3月26日
area:clieffort-largeeffort-mediumenhancementhelp wantedplatform:macospriority:medium
倉庫指標
- Star
- (48,085 star)
- PR 合併指標
- (平均合併 11天 1小時) (30 天內合併 45 個 PR)
描述
Context
RTK has minimal Swift support — only swift build has a TOML filter (swift-build.toml), and swift test was just added to the rewrite rules (#767) but has no output filter.
Swift developers use many more commands daily that would benefit from RTK filtering.
Scope
| Command | Output type | Filter approach | Expected savings |
|---|---|---|---|
swift test |
Test results (pass/fail, timing, assertions) | TOML or Rust — strip passing tests, show failures only | 80-90% |
swift test --parallel |
Parallel test output | Same as above | 80-90% |
swift test --filter |
Filtered test subset | Same as above | 70-80% |
swift package resolve |
Dependency resolution (Fetching/Resolving lines) | TOML — strip Fetching/Resolving noise | 80-90% |
swift package update |
Package update output | TOML — strip noise, show summary | 80-90% |
swift run |
Build + run output | TOML — strip Compiling/Linking, show app output | 70-80% |
swiftlint |
Linter violations | TOML or Rust — group by rule/severity | 70-85% |
swiftformat |
Formatter output | TOML — files changed summary | 70-80% |
xcodebuild test |
Xcode test output (very verbose) | Rust — complex output, failures only | 90-95% |
xcodebuild build |
Xcode build output | Already has xcodebuild.toml — verify coverage |
80-90% |
Current state
| What | Status |
|---|---|
swift build filter |
TOML swift-build.toml |
swift test rewrite |
PR #767 (approved) |
swift test filter |
Missing |
swift package |
Missing |
swift run |
Missing |
swiftlint |
Missing |
swiftformat |
Missing |
xcodebuild build filter |
TOML xcodebuild.toml |
xcodebuild test filter |
Missing |
Implementation
Most commands can be TOML filters (simple pattern stripping). swift test and xcodebuild test may need Rust modules for structured test output parsing (failures only, timing).
Rewrite rules to add
swift package resolve → rtk swift package resolve
swift package update → rtk swift package update
swift run → rtk swift run
swiftlint → rtk swiftlint
swiftformat → rtk swiftformat
References
- Existing filter:
src/filters/swift-build.toml - Existing filter:
src/filters/xcodebuild.toml - PR #767: swift test rewrite rule
- Issue #765: original swift test request