Skip to content

SwiftFormat - #2

Merged
dezinezync merged 2 commits into
dezinezync:mainfrom
richardpiazza:feature/swift-format
Apr 6, 2026
Merged

SwiftFormat#2
dezinezync merged 2 commits into
dezinezync:mainfrom
richardpiazza:feature/swift-format

Conversation

@richardpiazza

Copy link
Copy Markdown
Contributor

Adds a configuration and PR Job for SwfitFormat to keep code style and syntax in sync. Code can automatically be formatted to match expectations by (installing) and running swiftformat . in the project directory. The GitHub action runners already have this tool installed.

I've disabled a couple of rules to minimize the impact on the existing code. If there are any additional rules that should be disabled, I'd be happy to update. Here is the complete rule set: https://github.com/nicklockwood/SwiftFormat/blob/main/Rules.md

A couple of rules that I considered disabling which account for the biggest changes in the PR:

  • trailingSpace: By default this removes extra space characters at the end of lines and any line that is empty. I think this is best left enabled.
  • trailingCommas: By default this adds trailing commas where supported which helps to minimize diffs when altering code. Again, another one that is good to keep enabled.

Nikhil, feel free to completely reject this pull request if it's not something you are looking to incorporate on the project!

@richardpiazza
richardpiazza marked this pull request as ready for review March 26, 2026 16:24
@dezinezync

Copy link
Copy Markdown
Owner

Merging, thank you @richardpiazza

@dezinezync
dezinezync merged commit 66bb063 into dezinezync:main Apr 6, 2026
3 checks passed
@richardpiazza
richardpiazza deleted the feature/swift-format branch April 11, 2026 22:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants