Releases: nicklockwood/SwiftFormat
Releases · nicklockwood/SwiftFormat
0.56.3
0.56.2
0.56.1
- Fixed several issues where
trailingCommas
rule would insert commas in places not actually supported by Swift 6.1 - Fixed issue where
--wrapeffects
option would incorrectly unwrapasync let
properties following function call - Fixed issue where
redundantEquatable
rule would incorrectly remove==
implementation in favor of synthesized implementation even if type contained non-Equatable properties like tuples - Fixed issue where
extensionAccessControl
rule would incorrectly hoistpublic
ACL in@preconcurrency
conformances - Fixed issue where
organizeDeclarations
rule would sometimes break property declarations with if expression values
0.56.0
- Added
wrapMultilineFunctionChains
rule to wrap chained method calls - Added
environmentEntry
rule to update SwiftUIEnvironmentValues
definitions to use the@Entry
macro - Added
redundantEquatable
rule to remove explicitEquatable
conformances that would be compiler-synthesized - Added
preferSwiftTesting
rule to migrate XCTest-based tests to Swift Testing - Added
swiftTestingTestCaseNames
rule to remove redundant "test" prefix from Swift Testing test case methods - Added
preferCountWhere
rule to prefercount(where:)
overfilter(_:).count
- Added
fileMacro
rule to prefer either#file
or#fileID
, which have the same behavior in Swift 6 and later - Added
blankLinesAfterGuardStatements
rule to remove blank lines between consecuitve guard statements, and add blank line after last guard statement. - Added
privateStateVariables
rule to addprivate
access control to@State
properties - Added
emptyExtensions
rule to remove extensions that contain no declarations or conformances - Added
--preserveacronyms
option toacronyms
rule - Added
--wrapreturntype never
option towrapArguments
rule - Updated
trailingCommas
to support Swift 6.1 trailing comma functionality opaqueGenericParameters
now supports protocol requirements without a body--wrapeffects
and--wrapreturntype
now support protocol requirements and closure types- Fixed indentation of trailing closures after chained multiline method call when using same-line closing parens
blankLinesAtStartOfScope
rule now supports switch cases and closure capture / parameter lists- Fixed issue where type under
organizeDeclarations
line count threshold would ignoreswiftformat:sort
directives - Fixed issue where
organizeDeclarations
rule would unexpectedly remove non-mark comments - Compiling SwiftFormat now requires Swift 5.7+
- SwiftFormat prerelease builds can now be installed via Homebrew using
brew install swiftformat --head
. Prerelease builds are subject to breaking changes.
0.55.6
- Fixed parsing bugs related to parameter packs (
repeat
,each
keywords) - Fixed bug where
propertyTypes
rule could cause build failure in properties withsome
type - Fixed bug where
--callsiteparen balanced
would 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
yodaConditions
rule mangling generic function calls - Fixed indenting of guard
else
or opening brace followingif
/switch
expression - The
organizeDeclarations
rule no longer treats properties withdidSet
as computed - Improved formatting support for async and throwing closures
0.55.4
- Fixed inconsistent indenting of wrapped
where
clause forswitch ... case
statements - Fixed bug where
unusedArguments
could remove required arguments in some cases - The
sortTypealiases
rule now correctly handlesany
keyword
0.55.3
- Fixed bug where
sortTypealiases
rule could mangle generic types, or ones using theany
keyword - The
preferKeyPaths
rule now only uses\\.self
for Swift 6 and later (fix din't land yet in 5.10) - Added speculative fix for plugin
artifactbundle
not working onubuntu-latest
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