- Added
docCommentsBeforeModifiers
rule to hoist doc comments above declaration modifiers - Added
unusedPrivateDeclarations
rule to remove unusedprivate
orfileprivate
declarations - Added
propertyTypes
rule to control the use of inferred or explicit types for properties - Renamed the
--redundanttype
option to--propertytypes
as it's shared by both rules - Added
--ranges preserve
and--operatorfunc preserve
options - Added
--languagemode
option to specify if you are using Swift 5 or 6 language mode - The
organizeDeclarations
rule can now sort declarations by name/type/visibility/etc - Fixed
organizeDeclarations
bug where--beforemarks
unexpectedly matched keywords in function bodies - Fixed missing lint output for
organizeDeclarations
rule - Fixed bug in
markTypes
rule for chained protocol extension names - Renamed the confusing
--onelineforeach
option to--inlinedforeach
- Git info can now be used in header comments when formatting code from stdin
- You can now use the
--outputtokens
option to print output as tokens in JSON format - Each rule and test is now defined in a separate file to make it easier to maintain/contribute
- Updated minimum Swift version for building SwiftFormat to 5.3 (you can still format older Swift code)
- Docker build now uses static Linux SDK