Releases: nicklockwood/SwiftFormat
Releases Β· nicklockwood/SwiftFormat
0.53.3
- The
preferForLoop
rule now correctly singularizes loop conditions that end with "cases" - Fixed bug where
preferForLoop
mangled throwing or asyncforEach
expressions - Fixed extension body not being sorted if
organizeDeclarations
was enabled but excluded declaration type - Fixed conditionalAssignment bugs with
@unknown default
cases - Fixed some unsafe applications of the
enumNamespaces
rule - Add preliminary support for typed
throws
0.53.2
- Fixed bug where
hoistAwait
rule could moveawait
beforetry
keyword - Fixed bug where
redundantSelf
rule was confused by@MainActor
annotation - Fixed edge case where
unusedArguments
removed required argument insideguard
0.53.1
- Fixed bug where
fileHeader
could duplicate headers containing a colon - The
redundantInternal
rule no longer stripsinternal
fromimport
statements - Fixed false positive with
unusedArguments
rule
0.53.0
- Added
preferForLoop
rule to convertforEach { ... }
calls to regularfor
loops - Added
wrapLoopBodies
rule to wrap single-line loop bodies over multiple lines - Added
noExplicitOwnership
rule to remove unwantedborrowing
andconsuming
modifiers - Added
wrapMultilineConditionalAssignment
rule to wrapif
orswitch
expressions to new line - The
wrapAttributes
rule no longer unwraps attributes if they would exceed--maxwidth
- The
typeSugar
rule's--shortoptionals
option now defaults toexcept-properties
- Enabled
blankLinesBetweenChainedFunctions
rule by default - Enabled
blankLineAfterImports
rule by default - Fixed
self
being incorrectly inserted beforeset
clause in computed properties - Fixed a bug in
parseType()
helper function where qualified types were not recognized - Fixed Xcode command plugin
0.52.11
- Updated
if
/switch
expression workaround for Swift 5.9 bug to handleas!
casts - Fixed indent logic for wrapped conditional assignment expressions
- Fixed assertion failure in
redundantSelf
rule - Fixed raw string parsing bug
0.52.10
- Fixed
enumNamespaces
rule breakingimport struct
/class
statements - Fixed unsafe application of
conditionalAssignment
rule toswitch
statements containing#if
blocks
0.52.9
- Fixed
redundantClosure
removing required closure around conditional statements - Fixed
redundantClosure
removing closure containing conditional expressions inside a method call - Fixed
redundantClosure
generating invalid code when theredundantReturn
rule is disabled - Fixed issue where if/switch expressions with
as?
cast would break build in Swift 5.9 - Fixed
blankLineAfterImports
introducing spurious blank line before@preconcurrency
attribute - Fixed bug where
enumNamespaces
rule wouldn't be applied immediately after animport
statement - Fixed issue where
switch
case with multiplewhere
clauses could be parsed incorrectly - The SwiftFormat SPM plugin now formats local dependencies, not just final product targets
0.52.8
- Fixed
redundantClosure
rule in cases where anif
/switch
expression is not permitted - The
docComments
rule now correctly handles macro comments - The
docComments
rule is now only applied to a comment block if all lines match the pattern
0.52.7
- Fixed bug where
conditionalAssignment
andredundantClosure
rules would be applied incorrectly - Fixed
redundantClosure
rule leaving straytry
orawait
keywords behind
0.52.6
- Fixed bug where
redundantReturn
rule was incorrectly applied to consecutiveif
statements in Swift 5.9