mirror of
https://github.com/affaan-m/everything-claude-code.git
synced 2026-04-09 10:53:34 +08:00
feat: add Swift language-specific rules
Add 5 rule files for Swift following the established pattern used by TypeScript, Python, and Go rule sets. Covers Swift 6 strict concurrency, Swift Testing framework, protocol-oriented patterns, Keychain-based secret management, and SwiftFormat/SwiftLint hooks.
This commit is contained in:
20
rules/swift/hooks.md
Normal file
20
rules/swift/hooks.md
Normal file
@@ -0,0 +1,20 @@
|
||||
---
|
||||
paths:
|
||||
- "**/*.swift"
|
||||
- "**/Package.swift"
|
||||
---
|
||||
# Swift Hooks
|
||||
|
||||
> This file extends [common/hooks.md](../common/hooks.md) with Swift specific content.
|
||||
|
||||
## PostToolUse Hooks
|
||||
|
||||
Configure in `~/.claude/settings.json`:
|
||||
|
||||
- **SwiftFormat**: Auto-format `.swift` files after edit
|
||||
- **SwiftLint**: Run lint checks after editing `.swift` files
|
||||
- **swift build**: Type-check modified packages after edit
|
||||
|
||||
## Warning
|
||||
|
||||
Flag `print()` statements — use `os.Logger` or structured logging instead for production code.
|
||||
Reference in New Issue
Block a user