Skip to content

Commit 22a472c

Browse files
committed
Update for 0.59.1 release
1 parent 788e1a8 commit 22a472c

11 files changed

Lines changed: 41 additions & 32 deletions

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
# Change Log
22

3+
## [0.59.1](https://github.com/nicklockwood/SwiftFormat/releases/tag/0.59.1) (2026-01-29)
4+
5+
- Reverted changes to `indent` rule `--ifdef` handling from 0.59.0
6+
- Updated `docComments` rule to use doc comments on nested functions and handle conditional compilation blocks in function bodies
7+
- Updated `spaceAroundBrackets` to preserve space between global actor attribute and closure capture list
8+
- Updated `redundantMemberwiseInit` to preserve inits with attributes
9+
- Fixed handling of `any` keyword in `sortTypealiases` rule
10+
- Resolved build issue related to macOS 13 SDK availability
11+
312
## [0.59.0](https://github.com/nicklockwood/SwiftFormat/releases/tag/0.59.0) (2026-01-25)
413

514
- Added `simplifyGenericConstraints` rule

CommandLineTool/swiftformat

0 Bytes
Binary file not shown.

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ let package = Package(
252252
name: "BuildTools",
253253
platforms: [.macOS(.v10_11)],
254254
dependencies: [
255-
.package(url: "https://github.com/nicklockwood/SwiftFormat", from: "0.59.0"),
255+
.package(url: "https://github.com/nicklockwood/SwiftFormat", from: "0.59.1"),
256256
],
257257
targets: [.target(name: "BuildTools", path: "")]
258258
)
@@ -286,7 +286,7 @@ You can also use `swift run -c release --package-path BuildTools swiftformat "$S
286286
1. Add the `swiftformat` binary to your project directory via [CocoaPods](https://cocoapods.org/), by adding the following line to your Podfile then running `pod install`:
287287
288288
```ruby
289-
pod 'SwiftFormat/CLI', '~> 0.59.0'
289+
pod 'SwiftFormat/CLI', '~> 0.59.1'
290290
```
291291
292292
**NOTE:** This will only install the pre-built command-line app, not the source code for the SwiftFormat framework.
@@ -354,7 +354,7 @@ You can use `SwiftFormat` as a SwiftPM command plugin.
354354
```swift
355355
dependencies: [
356356
// ...
357-
.package(url: "https://github.com/nicklockwood/SwiftFormat", from: "0.59.0"),
357+
.package(url: "https://github.com/nicklockwood/SwiftFormat", from: "0.59.1"),
358358
]
359359
```
360360

Sources/CommandLine.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -597,7 +597,7 @@ func processArguments(_ args: [String], environment: [String: String] = [:], in
597597
inputURLs += try parseScriptInput(from: environment)
598598
}
599599

600-
// Treat values for arguments that do not take a value as input paths
600+
/// Treat values for arguments that do not take a value as input paths
601601
func addInputPaths(for argName: String) throws {
602602
guard let arg = args[argName], !arg.isEmpty else {
603603
return

Sources/FormattingHelpers.swift

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -887,10 +887,10 @@ extension Formatter {
887887
}
888888
}
889889

890-
// Wraps / re-wraps a multi-line statement where each delimiter index
891-
// should be the first token on its line, if the statement
892-
// is longer than the max width or there is already a linebreak
893-
// adjacent to one of the delimiters
890+
/// Wraps / re-wraps a multi-line statement where each delimiter index
891+
/// should be the first token on its line, if the statement
892+
/// is longer than the max width or there is already a linebreak
893+
/// adjacent to one of the delimiters
894894
@discardableResult
895895
func wrapMultilineStatement(
896896
startIndex: Int,
@@ -2653,14 +2653,14 @@ extension Formatter {
26532653
closureLocalNames.insert("self")
26542654
}
26552655

2656-
// Whether or not the closure at the current index permits implicit self.
2657-
//
2658-
// SE-0269 (in Swift 5.3) allows implicit self when:
2659-
// - the closure captures self explicitly using [self] or [unowned self]
2660-
// - self is not a reference type
2661-
//
2662-
// SE-0365 (in Swift 5.8) additionally allows implicit self using
2663-
// [weak self] captures after self has been unwrapped.
2656+
/// Whether or not the closure at the current index permits implicit self.
2657+
///
2658+
/// SE-0269 (in Swift 5.3) allows implicit self when:
2659+
/// - the closure captures self explicitly using [self] or [unowned self]
2660+
/// - self is not a reference type
2661+
///
2662+
/// SE-0365 (in Swift 5.8) additionally allows implicit self using
2663+
/// [weak self] captures after self has been unwrapped.
26642664
func closureAllowsImplicitSelf() -> Bool {
26652665
guard options.swiftVersion >= "5.3" else {
26662666
return false

Sources/ParsingHelpers.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1513,7 +1513,7 @@ extension Formatter {
15131513
) -> TypeName? {
15141514
let startToken = tokens[startOfTypeIndex]
15151515

1516-
// Helpers that calls `parseType` with all of the optional params passed in by default
1516+
/// Helpers that calls `parseType` with all of the optional params passed in by default
15171517
func parseType(at index: Int) -> TypeName? {
15181518
self.parseType(
15191519
at: index,

Sources/Rules/OrganizeDeclarations.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -666,8 +666,8 @@ extension Formatter {
666666
var declarationGroups: [[Declaration]] = []
667667
var currentGroup: [Declaration] = []
668668

669-
// Ends the current group, ensuring that groups are only recorded
670-
// when they contain two or more declarations.
669+
/// Ends the current group, ensuring that groups are only recorded
670+
/// when they contain two or more declarations.
671671
func endCurrentGroup(addingToExistingGroup declarationToAdd: Declaration? = nil) {
672672
if let declarationToAdd {
673673
currentGroup.append(declarationToAdd)

Sources/Rules/RedundantType.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ public extension FormatRule {
6060
return
6161
}
6262

63-
// Removes a type already processed by `compare(typeStartingAfter:withTypeStartingAfter:)`
63+
/// Removes a type already processed by `compare(typeStartingAfter:withTypeStartingAfter:)`
6464
func removeType(after indexBeforeStartOfType: Int, i: Int, j: Int, wasValue: Bool) {
6565
if isInferred {
6666
formatter.removeTokens(in: colonIndex ... typeEndIndex)

Sources/SwiftFormat.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
import Foundation
3333

3434
/// The current SwiftFormat version
35-
let swiftFormatVersion = "0.59.0"
35+
let swiftFormatVersion = "0.59.1"
3636
public let version = swiftFormatVersion
3737

3838
/// The standard SwiftFormat config file name
@@ -576,7 +576,7 @@ public func applyRules(
576576
}
577577
}
578578

579-
// Split tokens into lines
579+
/// Split tokens into lines
580580
func getLines(in tokens: [Token], includingLinebreaks: Bool) -> [Int: ArraySlice<Token>] {
581581
var lines: [Int: ArraySlice<Token>] = [:]
582582
var startIndex = 0, nextLine = 1

SwiftFormat.podspec.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "SwiftFormat",
3-
"version": "0.59.0",
3+
"version": "0.59.1",
44
"license": {
55
"type": "MIT",
66
"file": "LICENSE.md"
@@ -10,7 +10,7 @@
1010
"authors": "Nick Lockwood",
1111
"source": {
1212
"git": "https://github.com/nicklockwood/SwiftFormat.git",
13-
"tag": "0.59.0"
13+
"tag": "0.59.1"
1414
},
1515
"default_subspecs": "Core",
1616
"subspecs": [

0 commit comments

Comments
 (0)