Releases: nicklockwood/SwiftFormat
Releases · nicklockwood/SwiftFormat
0.55.6
- Fixed parsing bugs related to parameter packs (
repeat,eachkeywords) - Fixed bug where
propertyTypesrule could cause build failure in properties withsometype - Fixed bug where
--callsiteparen balancedwould have no effect when using--closingparen same-line - Fatal error messages now include the name of the currently-running rule
- Docker build now uses Swift 6.0.3
0.55.5
- Fixed bug with
yodaConditionsrule mangling generic function calls - Fixed indenting of guard
elseor opening brace followingif/switchexpression - The
organizeDeclarationsrule no longer treats properties withdidSetas computed - Improved formatting support for async and throwing closures
0.55.4
- Fixed inconsistent indenting of wrapped
whereclause forswitch ... casestatements - Fixed bug where
unusedArgumentscould remove required arguments in some cases - The
sortTypealiasesrule now correctly handlesanykeyword
0.55.3
- Fixed bug where
sortTypealiasesrule could mangle generic types, or ones using theanykeyword - The
preferKeyPathsrule now only uses\\.selffor Swift 6 and later (fix din't land yet in 5.10) - Added speculative fix for plugin
artifactbundlenot working onubuntu-latest
0.55.2
- Fixed bug where
unusedArgumentsfailed to remove arguments that matched switch variable bindings - Fixed bug where
unusedArgumentsfailed to remove arguments that matched nested function call labels - Fixed spurious lint errors for
blankLinesAtStartOfScopewhen usingorganizeDeclarationsrule - Fixed bug where indentation errors were incorrectly reported as
wraprule lint errors - The
preferKeyPathsrule now handles the\\.selfcase for Swift 5.10 and later - Fixed parsing of keyPaths beginning with
\.?
0.55.1
- Fixed bug where
docCommentsBeforeModifiersgot confused byenumcases that match modifier names - Fixed bug where
wrapEnumCaseswould mangle nested or successiveenumdeclarations - Artifact Bundle now includes pre-built binary for ARM-based Linux systems
0.55.0
- Added
docCommentsBeforeModifiersrule to hoist doc comments above declaration modifiers - Added
unusedPrivateDeclarationsrule to remove unusedprivateorfileprivatedeclarations - Added
propertyTypesrule to control the use of inferred or explicit types for properties - Renamed the
--redundanttypeoption to--propertytypesas it's shared by both rules - Added
--ranges preserveand--operatorfunc preserveoptions - Added
--languagemodeoption to specify if you are using Swift 5 or 6 language mode - The
organizeDeclarationsrule can now sort declarations by name/type/visibility/etc - Fixed
organizeDeclarationsbug where--beforemarksunexpectedly matched keywords in function bodies - Fixed missing lint output for
organizeDeclarationsrule - Fixed bug in
markTypesrule for chained protocol extension names - Renamed the confusing
--onelineforeachoption to--inlinedforeach - Git info can now be used in header comments when formatting code from stdin
- You can now use the
--outputtokensoption 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
wrapMultilineStatementBracesrule - Fixed tokenizing of a throwing closure type in a generics clause
- Fixed bug in
parseDeclarationswhere incorrect tokens could cause rules to time out - Fixed issue where
organizeDeclarationswould add extra blank lines if type had blank lines with spaces - Added known issue to README for
preferForLooprule
0.54.5
- Fixed crash in
unusedArgumentsrule - Fixed bug where
preferForLoopfailed ifforEachcontainsguard ... else { return }
0.54.4
- Fixed bug where trailing comma was erroneously inserted into a wrapped array type extension
- Fixed bug where
returnwas incorrectly removed insidecatchstatement withwhereclause - Fixed
opaqueGenericParametersrule being incorrectly applied to functions with typedthrows - Fixed
spaceAroundBracketsbehaving incorrectly inside a macro invocation - Fixed
unusedArgumentsfalse positive inside multiline string literal - Fixed a case where removing
returnresulted in non-compiling code for opaque return types - Redundant
Voidreturn type is now removed from functions in protocol declarations - Fixed a bug where
unusedArgumentsdidn'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