Releases: nicklockwood/SwiftFormat
Releases · nicklockwood/SwiftFormat
0.55.3
0.55.2
- Fixed bug where
unusedArguments
failed to remove arguments that matched switch variable bindings - Fixed bug where
unusedArguments
failed to remove arguments that matched nested function call labels - Fixed spurious lint errors for
blankLinesAtStartOfScope
when usingorganizeDeclarations
rule - Fixed bug where indentation errors were incorrectly reported as
wrap
rule lint errors - The
preferKeyPaths
rule now handles the\\.self
case for Swift 5.10 and later - Fixed parsing of keyPaths beginning with
\.?
0.55.1
- Fixed bug where
docCommentsBeforeModifiers
got confused byenum
cases that match modifier names - Fixed bug where
wrapEnumCases
would mangle nested or successiveenum
declarations - Artifact Bundle now includes pre-built binary for ARM-based Linux systems
0.55.0
- Added
docCommentsBeforeModifiers
rule to hoist doc comments above declaration modifiers - Added
unusedPrivateDeclarations
rule to remove unusedprivate
orfileprivate
declarations - Added
propertyTypes
rule to control the use of inferred or explicit types for properties - Renamed the
--redundanttype
option to--propertytypes
as it's shared by both rules - Added
--ranges preserve
and--operatorfunc preserve
options - Added
--languagemode
option to specify if you are using Swift 5 or 6 language mode - The
organizeDeclarations
rule can now sort declarations by name/type/visibility/etc - Fixed
organizeDeclarations
bug where--beforemarks
unexpectedly matched keywords in function bodies - Fixed missing lint output for
organizeDeclarations
rule - Fixed bug in
markTypes
rule for chained protocol extension names - Renamed the confusing
--onelineforeach
option to--inlinedforeach
- Git info can now be used in header comments when formatting code from stdin
- You can now use the
--outputtokens
option to print output as tokens in JSON format - Each rule and test is now defined in a separate file to make it easier to maintain/contribute
- Updated minimum Swift version for building SwiftFormat to 5.3 (you can still format older Swift code)
- Docker build now uses static Linux SDK
0.54.6
- Fixed incorrect wrapping of conditional bodies inside single-line string literals
- Fixed properties inside type with where clause being treated as local scope
- Fixed regression in
wrapMultilineStatementBraces
rule - Fixed tokenizing of a throwing closure type in a generics clause
- Fixed bug in
parseDeclarations
where incorrect tokens could cause rules to time out - Fixed issue where
organizeDeclarations
would add extra blank lines if type had blank lines with spaces - Added known issue to README for
preferForLoop
rule
0.54.5
- Fixed crash in
unusedArguments
rule - Fixed bug where
preferForLoop
failed ifforEach
containsguard ... else { return }
0.54.4
- Fixed bug where trailing comma was erroneously inserted into a wrapped array type extension
- Fixed bug where
return
was incorrectly removed insidecatch
statement withwhere
clause - Fixed
opaqueGenericParameters
rule being incorrectly applied to functions with typedthrows
- Fixed
spaceAroundBrackets
behaving incorrectly inside a macro invocation - Fixed
unusedArguments
false positive inside multiline string literal - Fixed a case where removing
return
resulted in non-compiling code for opaque return types - Redundant
Void
return type is now removed from functions in protocol declarations - Fixed a bug where
unusedArguments
didn't handle conditional assignment shadowing correctly - Fixed Xcode 16 Beta warnings related to unhandled files when building SwiftFormat package
- The Swift runtime is now packaged with the installer on Windows as on Linux
- The Windows installer now uses a more conventional directory structure
- SwiftFormat for Windows now supports arm64
0.54.3
- Fixed issue where
--wrapeffects never
could unexpectedly remove unrelated code - Fixed
--condassignment
option (setting this previously had no effect) - The
redundantReturn
rule no longer removes conditionalreturn
s ifconditionalAssignment
is disabled - The
redundantObjc
rule now strips implicit@objc
attribute for@IBSegueAction
functions - Fixed bug where violations for rules that insert new lines were sometimes ignored in lint output
0.54.2
- Fixed broken formatter cache, which caused a significant performance regression since 0.54.0
- The
blankLinesBetweenChainedFunctions
rule now removes blank line after comments in the chain - The
blankLinesBetweenChainedFunctions
rule no longer conflicts withblankLinesAroundMark
- Fixed
redundantInternal
removing requiredinternal
keyword in extensions withwhere
clause - Fixed another case of spurious
return
removal in conditional blocks - Fixed
redundantNilInit
rule insertingnil
afteras
keyword
0.54.1
- The
--nilInit insert
option is no longer applied to lazy or attributed properties - The
blankLinesBetweenChainedFunctions
rule now correctly handles comments in the chain - Fixed indenting of wrapped arguments in
--fragment
mode - Fixed bug where attributes were mistaken for an accessor in a computer property
- Fixed indenting of commented code after an opening bracket
- Fixed spurious removal of
return
in conditional blocks - Fixed
--lint
mode reporter output when usingstdin