mirror of
https://github.com/ghostty-org/ghostty.git
synced 2026-04-06 07:38:21 +00:00
SwiftLint <https://realm.github.io/SwiftLint/> is both a linter and formatting. It's a popular way to spot issues and enforce a consistent style. Our SwiftLint configuration lives in macos/.swiftlint.yml, where is is automatically discovered. It's very configurable, and I made an initial pass as some basic, weakly-opinionated rules. The "TODO" section lists rules that currently have violations but can be easily (auto)fixed in follow-up commits. Our integration is CLI-based. Similar to our other support tools, we expect developers to install `swiftlint` via nix or e.g. Homebrew. This is documented in HACKING.md. We also have an optional Xcode integration, for in-editor feedback. When `swiftlint` is available, it's run as a script-based Build Phase. SwiftLint supports an auto-fix mode (--fix). Agents are aware of this via AGENTS.md. The rules are enforced using a (nix-based) CI job.