Releases: nicklockwood/SwiftFormat
Releases · nicklockwood/SwiftFormat
0.53.7
- Fixed bug with
redundantParens
where first parens inside a closure were spuriously removed - Fixed
wrapEnumCases
rule mangling unindented cases - The
wrapEnumCases
rule no longer wraps cases inside inline enum declarations - Improved the
redundantInit
metatype heuristic to reduce false positives
0.53.6
- Fixed bug where a space was incorrectly added before a
.
operator inside attribute arguments - The
redundantType
rule no longer strips required explicit type from@Model
class default values - Fixed issue where
redundantInit
didn't work on collection types - The
redundantParens
rule now correctly handles@MainActor
closures - Fixed bug where required parens were removed around
each X
parameter pack expressions - Fixed issue where
--wrapreturntype if-multiline
didn't work with arrays, dictionaries, tuples, or generic types - The
spaceAroundParens/Brackets
rules now correctly insert a space afterborrowing
/consuming
andisolated
- Fixed spurious line breaks inserted between scoped
import
statements - Added
--doccomments preserve
option to preserve all doc comments, even if not followed by a declaration
0.53.5
- Fixed bug with trailing comma being inserted into wrapped capture list
- Fixed bugs with parsing
nonisolated(unsafe)
modifiers - Fixed bug with hoisting
try
orasync
after a string literal expression - Fixed issue with parsing expressions containing generic arguments
- Lint warnings are now displayed as errors when not running in
--lenient
mode - Improved error message for unexpected
static
/class
modifiers - Added Swift 6.0 to list of supported Swift versions
0.53.4
- The
enumNamespaces
rule is no longer applied to structs with attributes or macros - The new
nonisolated(unsafe)
modifier is now handled correctly - Added support for
do throws(Type) { ... }
clauses
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