nicklockwood / SwiftFormat

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

`modifierOrder` option documentation clarification #1691

Closed hamtiko closed 2 weeks ago

hamtiko commented 2 months ago

Related: https://github.com/nicklockwood/SwiftFormat/issues/849

Added an example syntax for the modifiersOrder option and separate section about default order by groups in the Rules.md doc.

nicklockwood commented 2 months ago

This is very helpful - thank you!

The contents of Rules.md are automatically generated from the Examples.swift file though, so the example should be added there too otherwise the metadata unit tests will fail.

hamtiko commented 2 months ago

thanks @nicklockwood, just noticed it with check fails. Changed it to use help param of OptionDescriptor. Do you think this is clear enough?