nicklockwood / SwiftFormat

A command-line tool and Xcode Extension for formatting Swift code
MIT License
7.63k stars 623 forks source link

Enable `swiftformat:sort` globally? #1617

Open domkm opened 5 months ago

domkm commented 5 months ago

Thanks for this fantastic tool!

I'm finding my code crowded with // swiftformat:sort comments. I can't think of a scenario where I wouldn't want to apply this to a type. Is it possible to enable this globally, like other rules? If not, would you consider implementing this?

nicklockwood commented 5 months ago

@calda thoughts?

calda commented 5 months ago

I personally wouldn't want this to be enabled by default, but I see the appeal of having this available as an option. It should be straightforward to update the existing code to support this.