Skip to content

Releases: nicklockwood/SwiftFormat

0.48.7

07 Jul 21:50
Compare
Choose a tag to compare
  • Fixed bug where redundantParens rule could introduce an ambiguity by removing parens around a range argument
  • Fixed bug where unowned(unsafe) capture argument would be mangled by unusedArguments rule
  • Fixed spurious double-indenting of trailing closures in some cases

0.48.6

24 Jun 06:43
Compare
Choose a tag to compare
  • Fixed bug where actor variables were incorrectly interpreted as a keyword in certain cases
  • The redundantBackticks rule no longer removes required backticks around actor properties
  • Doc comments containing TODO: are no longer converted to regular comments if it would mangle the docs

0.48.5

15 Jun 23:48
Compare
Choose a tag to compare
  • Fixed bug when parsing generic result builder attributes, leading to incorrect spacing
  • Fixed bug where wrapped function body was not double-indented as it should have been
  • Parser now correctly handles isolated and nonisolated modifiers on actor members
  • Fixed bug where space was incorrectly removed between closure capture list and arguments
  • Fixed bug with indenting of wrapped method chains

0.48.4

30 May 07:32
Compare
Choose a tag to compare
  • Added support for actor and other async/await syntax introduced in Swift 5.5
  • Functions with @Sendable closure parameters are now formatted correctly
  • The redundantGet rule no longer removes effectful get clauses (i.e. get throws or get async)
  • Fixed indenting of postfix expression members inside #else and #elseif clauses
  • The --typeattributes option now applies to extension attributes as well as type declarations
  • Improved indentation for accessors/method calls in multiline conditionals

0.48.3

22 May 21:37
Compare
Choose a tag to compare
  • Fixed bug where files would not be correctly excluded when using --stdinpath
  • Fixed bug with typeSugar rule affecting optional composed protocol types
  • Fixed bug where hoistPatternLet would incorrectly add let before nil or true/false

0.48.2

16 May 16:37
Compare
Choose a tag to compare
  • Fixed wrapping of generic property wrapper attributes
  • Fixed bug where trailing comma could be inserted inside a collection type signature

0.48.1

08 May 07:55
Compare
Choose a tag to compare
  • Fixed bug where typeSugar rule triggered a Swift bug inside case statements
  • Fixed double-indenting of trailing closure body on a wrapped line
  • Fixed compilation failure when installing SwiftFormat using Swift Package Manager
  • Fixed wrapping of namespaced property wrapper attributes
  • Fixed bug where redundantReturn rule removed required return inside catch statement
  • Fixed issue where redundantType rule introduced compilation warnings by removing explicit Void type
  • Fixed bug where trailing comma could be inserted inside a subscript nested inside a collection
  • Fixed spurious space inserted in generic result builder attributes
  • Successive reads of the same configuration file while formatting are now cached to improve performance

0.48.0

21 Apr 06:52
Compare
Choose a tag to compare
  • Added --emptybraces to control how empty braces are formatted
  • The redundantReturn rule now removes redundant return statements in Void functions
  • The redundantParens rule now removes redundant parens around closure arguments
  • Fixed parsing error with complex guard statements
  • Extended prefersKeyPath to support contains, allSatisfy and filter methods
  • Fixed matching of excluded paths containing ../
  • Added support for using globs/wildcards in input paths
  • Eliminated false positives in change list when using --lint mode
  • File header comments are now inserted after the shebang/hashbang in executable Swift scripts
  • Xcode Extension now silently ignores rules requiring file info that isn't available to extensions
  • Fixed bug where wrapEnumCases rule was incorrectly applied to if case or guard case
  • Added --report argument for exporting formatting changes or lint violations as a JSON file
  • Improved tab layout in SwiftFormat for Xcode companion app

0.47.13

21 Mar 23:13
Compare
Choose a tag to compare
  • Fixed bug where --wrapreturntype if-multiline would unexpectedly wrap a single-line method
  • Multiline chained functions are now indented correctly when using --xcodeindentation
  • Blank lines are no longer inserted between multiline chained functions separated by comments
  • Fixed bug in hoistPatternLet rule where let would be placed on the wrong line
  • Fixed bug where Void.self would incorrectly be converted to ().self
  • Fixed incorrect spacing of closure arguments containing attributes
  • Trailing commas are no longer incorrectly inserted inside wrapped type signatures
  • Added --lintonly argument to specify rules that should only be applied in --lint mode

0.47.12

23 Feb 02:00
Compare
Choose a tag to compare
  • Fixed indenting of switch cases inside #if/#endif clauses
  • Explicit self is no longer removed inside types using @dynamicMemberLookup
  • Fixed indenting of wrapped, chained methods when using --xcodeindentation
  • await is no longer treated as a keyword if --swiftversion is set to < 6
  • Fixed issue where single line method after array would wrap unexpectedly
  • Made repository checkoutable on Windows