SwiftFormat 0.54.0 was released yesterday: https://github.com/nicklockwood/SwiftFormat/releases/tag/0.54.0

This is a huge release with many bug fixes and new features.

Special thanks to @calstephens of Airbnb for his contributions.

#swift #swiftformat

Release 0.54.0 Β· nicklockwood/SwiftFormat

Added blankLineAfterSwitchCase rule for inserting blank lines after switch cases Added consistentSwitchCaseSpacing rule for ensuring consistent spacing between switch cases Added redundantProperty ...

GitHub

#devlog for today: finished the #obsidian #swiftformat plugin! At least, a basic version of it :)

https://github.com/peterkos/obsidian-swiftformat

GitHub - peterkos/obsidian-swiftformat: Format Swift code blocks in Obsidian

Format Swift code blocks in Obsidian. Contribute to peterkos/obsidian-swiftformat development by creating an account on GitHub.

GitHub

swift-format's OrderedImports should be better.

Swift files usually have a natural affinity. SwiftUI views, for instance, are SwiftUI. Models are SwiftData. Extensions to Foundation are Foundation.

Rewriting my imports so that a third party helper framework comes first just because it's alphabetically first is stupid. Likewise, putting SwiftData ahead of SwiftUI in a view is stupid.

Let me pick the first import and leave it alone! #iOSDev #Swift #swiftFormat

Ah, finally got rid of the #swiftformat lint complaints. It's a bit pickier than swiftlint.
@StewartLynch Any experience with #SwiftFormat and how it compares to #SwiftLint? I wonder how these two compare to each other. πŸ€” https://github.com/nicklockwood/SwiftFormat
GitHub - nicklockwood/SwiftFormat: A command-line tool and Xcode Extension for formatting Swift code

A command-line tool and Xcode Extension for formatting Swift code - nicklockwood/SwiftFormat

GitHub

#Swift #SwiftFormat

There are at least two things called β€œswift format”:

By @nicklockwood: https://github.com/nicklockwood/SwiftFormat

By Apple: https://github.com/apple/swift-format

Which one should I use, if I can choose freely for a project?

GitHub - nicklockwood/SwiftFormat: A command-line tool and Xcode Extension for formatting Swift code

A command-line tool and Xcode Extension for formatting Swift code - nicklockwood/SwiftFormat

GitHub