Releases: nicklockwood/SwiftFormat
Releases · nicklockwood/SwiftFormat
0.50.4
- Added Swift package command plugin
- Added
docComments
rule to convert between regular and documentation comments - Fixed
redundantLet
rule incorrectly strippinglet
inside Result Builders - Fixed
void
rule in cases whereVoid
has been locally shadowed - Fixed
fileHeader
rule when file only contains header comment - Fixed unexpected indent and spurious
wrap
warning for blank lines - Fixed parsing bug in
redundantSelf
rule
0.50.3
- Fixed bug where
redundantFileprivate
rule could break Array extensions using type sugar - Fixed bug and crash in
wrapSingleLineComments
rule relating to long URLs - Improved
wrapSingleLineComments
handling of comments containing long URLs - The
opaqueGenericParameters
rule is now correctly applied to initializers and subscripts - Added some known issues for
opaqueGenericParameters
andgenericExtensions
to README
0.50.2
- Fixed
redundantImports
dropping@_implementationOnly
or@_exported
annotations - Fixed
blankLineAfterImports
bug affecting@_implementationOnly
or@_exported
imports - Fixed case where regex literals were incorrectly interpreted as division operators
- Fixed bug with
genericExtensions
and nested generics - Fixed crash in
opaqueGenericParameters
rule
0.50.1
- Fixed bug in
opaqueGenericParameters
where type constraint depended on another type parameter - Fixed crash in
opaqueGenericParameters
rule where type constraint contained closure type - Fixed bug where
opaqueGenericParameters
broke variadic parameter expressions - Fixed several bugs in
wrapSingleLineComments
rule - Fixed crash in
andOperator
rule
0.50.0
- Added
genericExtensions
rule for simplifying conditional type extensions in Swift 5.7 - Added
markTypes
support for type definitions in extensions - Added
opaqueGenericParameters
rule to use opaque generic parameter syntax where equivalent - Added
blankLineAfterImports
rule - Added
redundantOptionalBinding
rule for simplifyingif let
expressions in Swift 5.7 - Added
--enumnamespaces structs-only
option - Added
wrapSingleLineComments
rule - A
--swiftversion
in the.swiftformat
config now takes precedence over.swift-version
file - Multiline string interpolations can now wrap inside parenthesized expression
- Comma-delimited options in descendent
.swiftformat
config files are no longer merged - SwiftFormat now requires a minimum of Swift 5.1 to build
0.49.18
- Fixed bug in
unusedArguments
when argument is shadowed in aswitch
case statement - Fixed
enumNamespaces
rule breakingopen
class declarations - Fixed
redundantLet
removinglet
incorrectly inasync let
statement - Fixed indent regression when using
--xcodeindentation
option
0.49.17
- Fixed unexpected token error occurring at end of scope after a
<<
operator - Fixed bug where function arguments named
async:
would expectedly be indented - SwiftFormat command-line tool now logs the location and version of .swift-version files it encounters
- Added Docker image (thanks to Arthur Semenyutin for the script, see README for details)
0.49.16
- Fixed
async let
indenting regression (broken in 0.49.15)
0.49.15
- Fixed illegal wrapping of ternary expressions inside single-line string interpolation
- Fixed bug where
await case
was incorrectly interpreted as ending the current scope - Fixed issue where
async throws
was indented incorrectly - Fixed bug where a pair of less-than, greater-than operators could be interpreted as generics
- Fixed case where
andOperator
rule could introduce parser ambiguity
0.49.14
- Fixed
unusedArguments
rule incorrectly removingasync
keyword from closure arguments - Fixed
unusedArguments
not being applied correctly to throwing closures - Fixed assertion failure when parsing
@unchecked Sendable
enum - Fixed assertion failure after applying typeSugar rule to array/dictionary extensions
- Fixed line indent after
wrapAttributes
rule is applied - Fixed issue where redundantClosure would break build for Void closures calling
@discardableResult
functions - Added
--typeblankline
option forblankLinesAtStartOfScope
andblankLinesAtEndOfScope
rules - Added support for Xcode
SCRIPT_INPUT_FILE
arguments