- The
redundantType
rule can now remove redundant types for properties initialized with literal values - The
redundantType
rule now removes types only for local variables by default (to aid compilation performance) - Added
assertionFailures
rule for automatically convertingassert(false, ...)
toassertionFailure(...)
- Added
acronyms
rule to auto-capitalize acronyms (disabled by default) - Added
preferDouble
rule to replaceCGFloat
withDouble
on Swift 5.5 and above (disabled by default) - Added
wrapConditionalBodies
rule to unwrap single-line guard and if statements (disabled by default) - Added
blockComments
rule to replace multiline block comments with line comments (disabled by default) - Added
blankLinesBetweenImports
rule to remove blank lines between import statements (disabled by default) - Added
redundantClosure
rule to remove unnecessary closure wrappers - Added
--lineaftermarks
option to add/remove a blank line after// MARK:
comments - Added
--markCategories
option fororganizeDeclarations
rule - Added
--wrapternary
option for controlling how ternary operators are wrapped - Added
--wraptypealiases
option for controlling how typealiases are wrapped - Added
--indentstrings
option for controlling how multiline strings are indented - Extended
redundantParens
rule to handle more cases - Extended
wrapMultilineStatementBraces
rule to handle more cases - Extended
redundantVoidReturnType
rule to apply to closure return values - Fixed bug where
consecutiveBlankLines
rule would strip linebreaks inside multiline string - Fixed bug with indenting of wrapped method chains when using
--xcodeindentation
- SwiftFormat for Xcode app binary is no longer hosted in source repository