Skip to content

Releases: nicklockwood/SwiftFormat

0.51.13

18 Jul 18:51
Compare
Choose a tag to compare
  • Fixed bug where importing a type caused the redundantSelf rule to be silently disabled
  • Fixed bug where unusedArguments would remove an argument that was used after an if
  • Fixed Windows support and added Windows release binaries (thanks to Saleem Abdulrasool)
  • Fixed bug where backticks were incorrectly stripped from standalone $ identifier
  • Added support for package keyword in organizeDeclarations rule

0.51.12

13 Jun 22:47
Compare
Choose a tag to compare
  • Fixed hoistTry bugs with generics, subscripts and collection literals
  • Fixed hoisting bugs with statements containing both try? and try
  • Fixed hoisting of try inside an optional function
  • Fixed function argument wrapping bug
  • Fixed bug where nested closure in was mistaken for part of a for loop
  • Added preliminary support for wrapping Swift 5.9 macro declarations
  • Added preliminary support for Swift 5.9 package access modifier
  • Added preliminary support for Swift 5.9 consume and discard operators
  • Added preliminary support for Swift 5.9 borrowing and consuming modifiers

0.51.11

29 May 18:59
Compare
Choose a tag to compare
  • Fixed unexpected static function error false positive in redundantSelf rule
  • Fixed failure to report lint error when removing a duplicate blank line at the end of the file
  • Fixed bug where hoistTry rule failed with more than 10 try expressions at the same scope level
  • Comments containing TODO: directives are no longer converted by the docComments rule

0.51.10

21 May 22:17
Compare
Choose a tag to compare
  • Fixed bug in wrapAttributes rule due to class declaration being mistaken for class-scoped var
  • Fixed another case of incorrect indenting inside an #ifdef block
  • Fixed linebreaks being incorrectly removed by sortedSwitchCases

0.51.9

04 May 21:25
Compare
Choose a tag to compare
  • Fixed typeSugar rule unwrapping Optional some/any without inserting required parentheses
  • Fixed indenting of function arguments inside an #ifdef block after a closing brace
  • Fixed comment directive state leaking between rules

0.51.8

02 May 19:21
Compare
Choose a tag to compare
  • Fixed redundantSelf removing non-unwrapped weak self inside closures
  • Fixed fileprivate rule making init private when inherited by subclass in the same file
  • Fixed hoistPatternLet rule inserting let inside dictionary type literal
  • Fixed indenting for chained members inside conditional compilation blocks
  • Fixed unusedArguments incorrectly removing used argument after conditional compilation block
  • Improved unusedArguments rule error handling

0.51.7

18 Apr 21:20
Compare
Choose a tag to compare
  • Fixed redundantSelf incorrectly inserting self for local variables declared in capture list
  • Fixed blankLineAfterImports rule inserting blank line before @_spi imports
  • Fixed fileHeader rule ignoring headers containing URLs

0.51.6

12 Apr 13:32
Compare
Choose a tag to compare
  • Required self is now preserved in function bodies inside closures with [weak self] captures
  • Fixed bug with hoistTry inside chains of concatenated interpolated strings
  • Fixed indenting of dot-prefixed identifiers inside #else and #elseif blocks
  • Fixed parsing bug in redundantSelf rule

0.51.5

09 Apr 13:45
Compare
Choose a tag to compare
  • Added --baseconfig option to replicate old --config behavior
  • Fixed self being incorrectly inserted inside capture list
  • Fixed indenting of .init inside #if statements
  • Fixed redundantInit glitch inside #if statements
  • Fixed redundantSelf inside if case expressions
  • Fixed hoistTry for strings containing multiple interpolation clauses
  • Fixed redundant parens not being removed after return keyword
  • Fixed spacing after attribute when using --funcattributes same-line
  • Fixed false positive in collection literals for unusedArguments
  • Fixed file access permissions errors not being reported

0.51.4

01 Apr 16:43
Compare
Choose a tag to compare
  • Limited redundantReturn inside if / switch expressions to Swift 5.9+
  • Fixed hoistTry and hoistAwait inside multiline string literals
  • Fixed invalid indenting of blank lines inside multiline string literals