mirror of
https://github.com/ghostty-org/ghostty.git
synced 2026-04-14 19:45:49 +00:00
macos: add root-level .swiftlint.yml (#10890)
In order to support running from both the repository root and from within Xcode project, and to keep things generally organized, our primary .swiftlint.yml configuration file lives under macos/. This change introduces a root-level .swiftlint.yml which limits the file scope to macos/ and then includes macos/.swiftlint.yml for the rest of the directives. This unlocks a few benefits: - We no longer need to pass an explicit `macos` path argument in any of our invocations. SwiftLint will do the right thing when run either from the repository root or from within the macos/ directory. - It lets us easily exclude the macos/build/ directory (and re-enable the 'deployment_target' rule). In the previous setup, this was more challenging than you'd expect due to SwiftLint's path resolution rules and required passing even more arguments like `--working-directory`. The only downside is adding a new file to the repository root, but that feels like the right trade-off given the benefits and conveniences.
This commit is contained in:
3
.github/workflows/test.yml
vendored
3
.github/workflows/test.yml
vendored
@@ -23,6 +23,7 @@ jobs:
|
||||
with:
|
||||
filters: |
|
||||
macos:
|
||||
- '.swiftlint.yml'
|
||||
- 'macos/**'
|
||||
|
||||
required:
|
||||
@@ -963,7 +964,7 @@ jobs:
|
||||
useDaemon: false # sometimes fails on short jobs
|
||||
|
||||
- name: swiftlint check
|
||||
run: nix develop -c swiftlint lint --strict macos
|
||||
run: nix develop -c swiftlint lint --strict
|
||||
|
||||
alejandra:
|
||||
if: github.repository == 'ghostty-org/ghostty'
|
||||
|
||||
Reference in New Issue
Block a user