Releases: nicklockwood/SwiftFormat
Releases · nicklockwood/SwiftFormat
0.51.10
- Fixed bug in
wrapAttributes
rule due toclass
declaration being mistaken for class-scoped var - Fixed another case of incorrect indenting inside an
#ifdef
block - Fixed linebreaks being incorrectly removed by
sortedSwitchCases
0.51.9
- Fixed
typeSugar
rule unwrapping Optionalsome/any
without inserting required parentheses - Fixed indenting of function arguments inside an
#ifdef
block after a closing brace - Fixed comment directive state leaking between rules
0.51.8
- Fixed
redundantSelf
removing non-unwrapped weakself
inside closures - Fixed
fileprivate
rule makinginit
private when inherited by subclass in the same file - Fixed
hoistPatternLet
rule insertinglet
inside dictionary type literal - Fixed indenting for chained members inside conditional compilation blocks
- Fixed
unusedArguments
incorrectly removing used argument after conditional compilation block - Improved
unusedArguments
rule error handling
0.51.7
- Fixed
redundantSelf
incorrectly insertingself
for local variables declared in capture list - Fixed
blankLineAfterImports
rule inserting blank line before@_spi
imports - Fixed
fileHeader
rule ignoring headers containing URLs
0.51.6
- Required
self
is now preserved in function bodies inside closures with[weak self]
captures - Fixed bug with
hoistTry
inside chains of concatenated interpolated strings - Fixed indenting of dot-prefixed identifiers inside
#else
and#elseif
blocks - Fixed parsing bug in
redundantSelf
rule
0.51.5
- Added
--baseconfig
option to replicate old--config
behavior - Fixed
self
being incorrectly inserted inside capture list - Fixed indenting of
.init
inside#if
statements - Fixed
redundantInit
glitch inside#if
statements - Fixed
redundantSelf
insideif case
expressions - Fixed
hoistTry
for strings containing multiple interpolation clauses - Fixed redundant parens not being removed after
return
keyword - Fixed spacing after attribute when using
--funcattributes same-line
- Fixed false positive in collection literals for
unusedArguments
- Fixed file access permissions errors not being reported
0.51.4
- Limited
redundantReturn
inside if / switch expressions to Swift 5.9+ - Fixed
hoistTry
andhoistAwait
inside multiline string literals - Fixed invalid indenting of blank lines inside multiline string literals
0.51.3
- Fixed
hoistTry
andhoistAwait
rule breaking string interpolations - Fixed bug where
opaqueGenericParameters
rule would remove non-redundant generic type - Fixed parsing bug with trailing closures on optional methods
- Fixed
redundantSelf
rule parsing bug affecting string literals - Updated if / switch expression features to be enabled only in Swift 5.9+
0.51.2
- Fixed
hoistTry
rule breaking multiline function chains - Added
--asynccapturing
and--throwcapturing
options forhoistTry
andhoistAwait
rules - Fixed changes in last line of file not being correctly tracked
0.51.1
- Fixed
redundantNilInit
removing requirednil
inside Result Builders - Fixed
redundantLet
removing requiredlet
inside Result Builderswitch/case
statements - Fixed
hoistTry
rule removing secondtry
inside XCTAssert statements