Releases: nicklockwood/SwiftFormat
Releases · nicklockwood/SwiftFormat
0.48.7
- Fixed bug where
redundantParens
rule could introduce an ambiguity by removing parens around a range argument - Fixed bug where
unowned(unsafe)
capture argument would be mangled byunusedArguments
rule - Fixed spurious double-indenting of trailing closures in some cases
0.48.6
- Fixed bug where
actor
variables were incorrectly interpreted as a keyword in certain cases - The
redundantBackticks
rule no longer removes required backticks aroundactor
properties - Doc comments containing TODO: are no longer converted to regular comments if it would mangle the docs
0.48.5
- Fixed bug when parsing generic result builder attributes, leading to incorrect spacing
- Fixed bug where wrapped function body was not double-indented as it should have been
- Parser now correctly handles
isolated
andnonisolated
modifiers onactor
members - Fixed bug where space was incorrectly removed between closure capture list and arguments
- Fixed bug with indenting of wrapped method chains
0.48.4
- Added support for
actor
and other async/await syntax introduced in Swift 5.5 - Functions with
@Sendable
closure parameters are now formatted correctly - The
redundantGet
rule no longer removes effectful get clauses (i.e.get throws
orget async
) - Fixed indenting of postfix expression members inside
#else
and#elseif
clauses - The
--typeattributes
option now applies to extension attributes as well as type declarations - Improved indentation for accessors/method calls in multiline conditionals
0.48.3
- Fixed bug where files would not be correctly excluded when using
--stdinpath
- Fixed bug with
typeSugar
rule affecting optional composed protocol types - Fixed bug where
hoistPatternLet
would incorrectly add let beforenil
ortrue
/false
0.48.2
- Fixed wrapping of generic property wrapper attributes
- Fixed bug where trailing comma could be inserted inside a collection type signature
0.48.1
- Fixed bug where
typeSugar
rule triggered a Swift bug inside case statements - Fixed double-indenting of trailing closure body on a wrapped line
- Fixed compilation failure when installing SwiftFormat using Swift Package Manager
- Fixed wrapping of namespaced property wrapper attributes
- Fixed bug where
redundantReturn
rule removed required return insidecatch
statement - Fixed issue where
redundantType
rule introduced compilation warnings by removing explicit Void type - Fixed bug where trailing comma could be inserted inside a subscript nested inside a collection
- Fixed spurious space inserted in generic result builder attributes
- Successive reads of the same configuration file while formatting are now cached to improve performance
0.48.0
- Added
--emptybraces
to control how empty braces are formatted - The
redundantReturn
rule now removes redundantreturn
statements in Void functions - The
redundantParens
rule now removes redundant parens around closure arguments - Fixed parsing error with complex
guard
statements - Extended
prefersKeyPath
to supportcontains
,allSatisfy
andfilter
methods - Fixed matching of excluded paths containing ../
- Added support for using globs/wildcards in input paths
- Eliminated false positives in change list when using
--lint
mode - File header comments are now inserted after the shebang/hashbang in executable Swift scripts
- Xcode Extension now silently ignores rules requiring file info that isn't available to extensions
- Fixed bug where
wrapEnumCases
rule was incorrectly applied toif case
orguard case
- Added
--report
argument for exporting formatting changes or lint violations as a JSON file - Improved tab layout in SwiftFormat for Xcode companion app
0.47.13
- Fixed bug where
--wrapreturntype if-multiline
would unexpectedly wrap a single-line method - Multiline chained functions are now indented correctly when using
--xcodeindentation
- Blank lines are no longer inserted between multiline chained functions separated by comments
- Fixed bug in
hoistPatternLet
rule wherelet
would be placed on the wrong line - Fixed bug where
Void.self
would incorrectly be converted to().self
- Fixed incorrect spacing of closure arguments containing attributes
- Trailing commas are no longer incorrectly inserted inside wrapped type signatures
- Added
--lintonly
argument to specify rules that should only be applied in--lint
mode
0.47.12
- Fixed indenting of
switch
cases inside#if
/#endif
clauses - Explicit
self
is no longer removed inside types using@dynamicMemberLookup
- Fixed indenting of wrapped, chained methods when using
--xcodeindentation
await
is no longer treated as a keyword if--swiftversion
is set to < 6- Fixed issue where single line method after array would wrap unexpectedly
- Made repository checkoutable on Windows