Swiftlint for swift parts of Ghostty #4475
Unanswered
cristeahub
asked this question in
Feature Requests, Ideas
Replies: 1 comment
-
I suggest using Swift Format https://github.com/swiftlang/swift-format. It is embedded in to Xcode 16, thus no additional packages is required to install. You can run it from command line by calling |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I suggest adding swiftlint https://github.com/realm/SwiftLint (or any other linter) to the swift/macos/ios parts of ghostty.
Linters (and formatters) has become a normal part of development and helps enforce style and conventions. Having this for ghostty would be a big help when working on the swift part of the project.
Swiftlint specifically also allows for formatting by running
swiftlint lint --format
. It also has good guides for setup in all parts of mac development (i.e. on CI, during build phase, in the terminal etc).What needs to be done before starting this
This list might not be exhaustive
Caveats
When creating and merging these types of lint PR-s you usually get a lot of merge conflicts. So starting this after tools and conventions has landed helps with this. In addition this should be done when the Ghostty team is ready to get it merged, so a PR won't be stuck in review for too long, which will make it become "stale" (i.e. merge conflicts).
In addition other PR-s that are not merged yet will quickly need a rebase due to styling changes after the lint PR is merged.
Beta Was this translation helpful? Give feedback.
All reactions