Tools
Rockxy enforces code style with two tools. Configuration lives in the repository root:- SwiftLint —
.swiftlint.yml— linting rules and complexity limits - SwiftFormat —
.swiftformat— automatic formatting
Formatting
Import Order
System frameworks first (alphabetically), then third-party packages, then local modules. Separate groups with a blank line:Access Control
Always specify access control explicitly — on the extension when all members share the same level, on individual members otherwise:Optionals
No force unwrapping (!) or force casting (as!) anywhere in the codebase. Use safe alternatives:
Logging
Use OSLog through theLogger API. Every type that logs should declare a static logger:
Localization
UseString(localized:) for all user-facing strings in non-SwiftUI code:
Text("Start Proxy") and Button("Clear Session") are automatically looked up in the strings catalog. Do not wrap these in String(localized:).
Do not localize technical terms (HTTP, TLS, WebSocket, GraphQL, etc.).
Naming Conventions
Comments
Do not add comments that restate what the code already says. Only comment to explain non-obvious reasoning:SwiftLint Limits
Commits
Follow Conventional Commits. Single line, no description body:feat, fix, refactor, docs, test, chore, perf.
Branch Naming
Create branches frommain with a prefix matching the work type:
Next Steps
Architecture
Understand the actor model, coordinator pattern, and data flow
Building
Build from source, run tests, and lint your changes
