Open mesqueeb opened 2 hours ago
Synced to Apple’s issue tracker as rdar://136327486
as per these docs: https://github.com/swiftlang/swift-format/blob/main/Documentation/Configuration.md#example
I have added a .swift-format
file with the following contents to my Xcode workspace root:
{
"version": 1,
"lineLength": 120,
"indentation": {
"spaces": 2
},
"maximumBlankLines": 1
}
but executing Format File with 'swift-format'
will not use this configuration. 🤔
Executing
swift format dump-configuration
on macOS 15 shows the default Swift format rules.I'd like to save this JSON somewhere in my project, so that Xcode automatically uses those rules when tapping
Format File with 'swift-format'
in Xcode 16.Committing the rules config json to the project, would make the entire team use the same rules as well.
Can we add a section on the README that explains this? I believe any project that has more than 1 person working on it needs this. :tada: