mirror of
https://github.com/affaan-m/everything-claude-code.git
synced 2026-04-11 03:43:30 +08:00
docs(zh-CN): sync Chinese docs with latest upstream changes (#304)
* docs(zh-CN): sync Chinese docs with latest upstream changes * update --------- Co-authored-by: neo <neo.dowithless@gmail.com>
This commit is contained in:
21
docs/zh-CN/rules/swift/hooks.md
Normal file
21
docs/zh-CN/rules/swift/hooks.md
Normal file
@@ -0,0 +1,21 @@
|
||||
---
|
||||
paths:
|
||||
- "**/*.swift"
|
||||
- "**/Package.swift"
|
||||
---
|
||||
|
||||
# Swift 钩子
|
||||
|
||||
> 此文件扩展了 [common/hooks.md](../common/hooks.md) 的内容,添加了 Swift 特定内容。
|
||||
|
||||
## PostToolUse 钩子
|
||||
|
||||
在 `~/.claude/settings.json` 中配置:
|
||||
|
||||
* **SwiftFormat**: 在编辑后自动格式化 `.swift` 文件
|
||||
* **SwiftLint**: 在编辑 `.swift` 文件后运行代码检查
|
||||
* **swift build**: 在编辑后对修改的包进行类型检查
|
||||
|
||||
## 警告
|
||||
|
||||
标记 `print()` 语句 — 在生产代码中请改用 `os.Logger` 或结构化日志记录。
|
||||
Reference in New Issue
Block a user