Releases: nicklockwood/SwiftFormat
Releases · nicklockwood/SwiftFormat
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
0.51.0
- Added
hoistAwait
andhoistTry
rules to hoist inlineawait
/try
to start of expression - Extended
redundantPattern
rule to remove redundantlet
in patterns - The
wrapMultilineStatementBraces
rules is now applied more consistently - Updated
redundantReturn
/Closure
rules to supportif
/switch
expressions in Swift 5.8 - Added
conditionalAssignment
rule to assign variables usingif
/switch
expressions in Swift 5.8 - Updated
redundantType
rule to supportif
/switch
expression assignment Swift 5.8 - Extended
redundantSelf
rule to support implicitself
in eligible closures in Swift 5.8 - SwiftFormat now ignores
.swiftformat
files when explicit--config
file is provided - Added
--wrapenumcases with-values
option to only wrap enum cases with values - Added
--wrapeffects
option for wrapping function effects - Removed unsafe
preferDouble
rule
0.50.9
- Added Github actions log reporter (see
--reporter
option for details) - Fixed bug where
redundantType
sometimes stripped in cases where it couldn't be inferred - The
redundantType
rule now supports removing type in more cases where supported - Made SwiftFormat for Xcode instructions dynamic according to OS version
- Fixed bug where a trailing comma could be left behind by
opaqueGenericParameters
rule - Fixed bug where
wrapAttributes
rule sometimes wrapped inline attributes like@MainActor
- Improved support for
// swiftformat:options
comment directives - Removed deprecated options from the example
.swiftformat
file
0.50.8
- The
redundantBackticks
rule no longer removes required comments aroundself
- Associated type headerdoc comments are now handles correctly by the
docComments
rule - Fixed mangled comments when using the
sortedSwitchCases
rule - Hex, octal or binary literals are now sorted correctly in
sortedSwitchCases
rule - Fixed regression in closed brace indentation (introduced in 0.50.7)
- Fixed unsafe semicolon removal after inferred
var
properties - Added fileHeader placeholder documentation
0.50.7
- Fixed parsing of regex literals preceded by
try
orawait
- Fixed required parens being removed around
await
keyword - Fixed indent for nested, wrapped parameters
0.50.6
- Fixed regression in
fileHeader
rule where blank lines were removed after header - Fixed globs matching when command-line tool is invoked from a directory such as
/var/tmp
- Fixed bug in parsing regex literals beginning with
^
character
0.50.5
- Fixed incorrect macOS command line binary that accidentally shipped with 0.50.4