Skip to content

Releases: nicklockwood/SwiftFormat

0.50.4

23 Nov 21:44
Compare
Choose a tag to compare
  • Added Swift package command plugin
  • Added docComments rule to convert between regular and documentation comments
  • Fixed redundantLet rule incorrectly stripping let inside Result Builders
  • Fixed void rule in cases where Void has been locally shadowed
  • Fixed fileHeader rule when file only contains header comment
  • Fixed unexpected indent and spurious wrap warning for blank lines
  • Fixed parsing bug in redundantSelf rule

0.50.3

19 Oct 15:33
Compare
Choose a tag to compare
  • Fixed bug where redundantFileprivate rule could break Array extensions using type sugar
  • Fixed bug and crash in wrapSingleLineComments rule relating to long URLs
  • Improved wrapSingleLineComments handling of comments containing long URLs
  • The opaqueGenericParameters rule is now correctly applied to initializers and subscripts
  • Added some known issues for opaqueGenericParameters and genericExtensions to README

0.50.2

12 Oct 21:12
Compare
Choose a tag to compare
  • Fixed redundantImports dropping @_implementationOnly or @_exported annotations
  • Fixed blankLineAfterImports bug affecting @_implementationOnly or @_exported imports
  • Fixed case where regex literals were incorrectly interpreted as division operators
  • Fixed bug with genericExtensions and nested generics
  • Fixed crash in opaqueGenericParameters rule

0.50.1

05 Oct 23:14
Compare
Choose a tag to compare
  • Fixed bug in opaqueGenericParameters where type constraint depended on another type parameter
  • Fixed crash in opaqueGenericParameters rule where type constraint contained closure type
  • Fixed bug where opaqueGenericParameters broke variadic parameter expressions
  • Fixed several bugs in wrapSingleLineComments rule
  • Fixed crash in andOperator rule

0.50.0

28 Sep 21:06
Compare
Choose a tag to compare
  • Added genericExtensions rule for simplifying conditional type extensions in Swift 5.7
  • Added markTypes support for type definitions in extensions
  • Added opaqueGenericParameters rule to use opaque generic parameter syntax where equivalent
  • Added blankLineAfterImports rule
  • Added redundantOptionalBinding rule for simplifying if let expressions in Swift 5.7
  • Added --enumnamespaces structs-only option
  • Added wrapSingleLineComments rule
  • A --swiftversion in the .swiftformat config now takes precedence over .swift-version file
  • Multiline string interpolations can now wrap inside parenthesized expression
  • Comma-delimited options in descendent .swiftformat config files are no longer merged
  • SwiftFormat now requires a minimum of Swift 5.1 to build

0.49.18

30 Aug 20:37
Compare
Choose a tag to compare
  • Fixed bug in unusedArguments when argument is shadowed in a switch case statement
  • Fixed enumNamespaces rule breaking open class declarations
  • Fixed redundantLet removing let incorrectly in async let statement
  • Fixed indent regression when using --xcodeindentation option

0.49.17

16 Aug 18:08
Compare
Choose a tag to compare
  • Fixed unexpected token error occurring at end of scope after a << operator
  • Fixed bug where function arguments named async: would expectedly be indented
  • SwiftFormat command-line tool now logs the location and version of .swift-version files it encounters
  • Added Docker image (thanks to Arthur Semenyutin for the script, see README for details)

0.49.16

15 Aug 07:29
Compare
Choose a tag to compare
  • Fixed async let indenting regression (broken in 0.49.15)

0.49.15

13 Aug 09:44
Compare
Choose a tag to compare
  • Fixed illegal wrapping of ternary expressions inside single-line string interpolation
  • Fixed bug where await case was incorrectly interpreted as ending the current scope
  • Fixed issue where async throws was indented incorrectly
  • Fixed bug where a pair of less-than, greater-than operators could be interpreted as generics
  • Fixed case where andOperator rule could introduce parser ambiguity

0.49.14

02 Aug 19:47
Compare
Choose a tag to compare
  • Fixed unusedArguments rule incorrectly removing async keyword from closure arguments
  • Fixed unusedArguments not being applied correctly to throwing closures
  • Fixed assertion failure when parsing @unchecked Sendable enum
  • Fixed assertion failure after applying typeSugar rule to array/dictionary extensions
  • Fixed line indent after wrapAttributes rule is applied
  • Fixed issue where redundantClosure would break build for Void closures calling @discardableResult functions
  • Added --typeblankline option for blankLinesAtStartOfScope and blankLinesAtEndOfScope rules
  • Added support for Xcode SCRIPT_INPUT_FILE arguments