Releases: nicklockwood/SwiftFormat
Releases · nicklockwood/SwiftFormat
0.49.13
- Fixed
for...in
mistaken for closurein
in indent rule - Fixed incorrect spacing around
@MainActor
0.49.12
- Fix bug with parsing ternary chains containing chevron
- Add another fix for
/
operator - Fix indent after wrapped closure
in
- Improve rule search in SwiftFormat for Xcode app
- Fix enum popups in SwiftFormat for Xcode options
- Added prebuilt SPM binary target
0.49.11
- Fixed parsing of prefix
/
operator (as used in CasePath library) - Fixed bug with indenting of trailing closures after a conditional statement
- Fixed bug with
wrapMultilineStatementBraces
rule - Added Swift 5.6 and 5.7 to supported versions
0.49.10
- Added preliminary support for Swift 5.7 regular expression literals
- Fixed conflict between
wrapMultilineStatementBraces
andindent
rules - Fixed bug where arguments referenced using
$
prefix were incorrectly marked as unused - Fixed
enumNamespaces
bug whereclass
modifiers were mistakenly converted toenum
- Fixed bug where
preferKeyPath
mangled functions using multiple trailing closure syntax - Unterminated string literals are now treated as an error
0.49.9
- Fixed bug where trailing comma was incorrectly added inside collection types
- Fixed some cases where
redundantVoidReturnType
failed to removeVoid
- Fixed
unusedArguments
regression introduced in 0.49.8
0.49.8
- Fixed
redundantInit
rule removing required init when instantiating type variables - Fixed
unusedArguments
incorrectly marking shadowed parameters as used or unused in some cases
0.49.7
- Redundant
self
is now correctly removed inif let
assignments - Fixed infinite recursion bug that would cause formatting to time out for some inputs
- Lint failure now returns an error code when using stdin, matching behavior for file inputs
- Fixed bug where parens were incorrectly removed around optional ranges
- Updated
unusedParens
rule for new shorthandif let
syntax in Swift 5.7 - Updated indenting of function chains to match latest Xcode behavior
- Fixed build error on macOS 10.11 and earlier
0.49.6
- Fixed bug where
redundantParens
rule removed required parens inany
type expressions - Fixed whitespace behavior around
some
/any
keywords - Fixed crash when
// swiftformat:sort
was applied to an enum with only one case - SwiftFormat can now be built on Windows
0.49.5
- Fixed bug where
redundantClosure
incorrectly inlined throwing closures - Fixed bug where in
--exclude
path matching failed when using--stdinpath
- Fixed a bug with
typeSugar
rule when overriding stdlib types locally in your code - Multiline statement braces are now unwrapped if
wrapMultilineStatementBraces
disabled - Added
// swiftformat:sort
directive to sort declarations by name - You can now use
--disable all
or--enable all
as shorthand for all rules - The rules in the
Rules.md
file are now grouped by their default/enabled status
0.49.4
- Fixed creation date being modified on formatted files
- Fixed case where a closure inside an if condition was mistaken for the body
- Fixed
blockComments
rule removing leading*
s used as bullet points - Fixed bug when parsing a raw string containing three consecutive unescaped quotes
- Fixed spurious warning about unused
--wrapparameters
option - Fixed edge case when using
--allman
indenting