Skip to content

Commit

Permalink
Update for 0.52.5 release
Browse files Browse the repository at this point in the history
  • Loading branch information
nicklockwood committed Sep 30, 2023
1 parent 4adf5b3 commit 7eb1706
Show file tree
Hide file tree
Showing 8 changed files with 21 additions and 13 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# Change Log

## [0.52.5](https://github.com/nicklockwood/SwiftFormat/releases/tag/0.52.5) (2023-09-30)

- Fixed bug where `redundantReturn` rule could break fallible initializers in Swift 5.9
- Fixed incorrect application of `docComments` rule inside `#if` statements
- The `docComments` rule no longer treats comments starting with `Note:` as a special directive
- Fixed incorrect indenting inside `#if` statements immediately preceded by a comment
- Removed arbitrary unwrap threshold for `braces` rule when no `--maxwidth` is specified
- You can now include operators in the `--asynccapturing` list

## [0.52.4](https://github.com/nicklockwood/SwiftFormat/releases/tag/0.52.4) (2023-09-17)

- Fixed `docComments` rule incorrectly replacing comments inside switch cases and if/guard conditions
Expand Down
Binary file modified CommandLineTool/swiftformat
Binary file not shown.
2 changes: 1 addition & 1 deletion Sources/Formatter.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Formatter.swift
// SwiftFormat
//
// Version 0.52.4
// Version 0.52.5
//
// Created by Nick Lockwood on 12/08/2016.
// Copyright 2016 Nick Lockwood
Expand Down
3 changes: 1 addition & 2 deletions Sources/FormattingHelpers.swift
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,7 @@ extension Formatter {
{
// If we find the end of the condition instead of an = token,
// then this was a shorthand `if let self` condition.
if tokens[equalsIndex] == .startOfScope("{") || tokens[equalsIndex] == .delimiter(",") || tokens[equalsIndex] == .keyword("else")
{
if tokens[equalsIndex] == .startOfScope("{") || tokens[equalsIndex] == .delimiter(",") || tokens[equalsIndex] == .keyword("else") {
isPermittedImplicitSelfRebinding = true
} else if tokens[equalsIndex] == Token.operator("=", .infix),
let rhsSelfIndex = self.index(of: .nonSpaceOrCommentOrLinebreak, after: equalsIndex),
Expand Down
2 changes: 1 addition & 1 deletion Sources/SwiftFormat.swift
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
import Foundation

/// The current SwiftFormat version
let swiftFormatVersion = "0.52.4"
let swiftFormatVersion = "0.52.5"
public let version = swiftFormatVersion

/// The standard SwiftFormat config file name
Expand Down
2 changes: 1 addition & 1 deletion Sources/Tokenizer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Tokenizer.swift
// SwiftFormat
//
// Version 0.52.4
// Version 0.52.5
//
// Created by Nick Lockwood on 11/08/2016.
// Copyright 2016 Nick Lockwood
Expand Down
4 changes: 2 additions & 2 deletions SwiftFormat.podspec.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "SwiftFormat",
"version": "0.52.4",
"version": "0.52.5",
"license": {
"type": "MIT",
"file": "LICENSE.md"
Expand All @@ -10,7 +10,7 @@
"authors": "Nick Lockwood",
"source": {
"git": "https://github.com/nicklockwood/SwiftFormat.git",
"tag": "0.52.4"
"tag": "0.52.5"
},
"default_subspecs": "Core",
"subspecs": [
Expand Down
12 changes: 6 additions & 6 deletions SwiftFormat.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -1111,7 +1111,7 @@
"@loader_path/Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 10.14;
MARKETING_VERSION = 0.52.4;
MARKETING_VERSION = 0.52.5;
MODULE_VERIFIER_SUPPORTED_LANGUAGES = "objective-c objective-c++";
MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS = "gnu99 gnu++11";
PRODUCT_BUNDLE_IDENTIFIER = com.charcoaldesign.SwiftFormat;
Expand Down Expand Up @@ -1144,7 +1144,7 @@
"@loader_path/Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 10.14;
MARKETING_VERSION = 0.52.4;
MARKETING_VERSION = 0.52.5;
MODULE_VERIFIER_SUPPORTED_LANGUAGES = "objective-c objective-c++";
MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS = "gnu99 gnu++11";
PRODUCT_BUNDLE_IDENTIFIER = com.charcoaldesign.SwiftFormat;
Expand Down Expand Up @@ -1251,7 +1251,7 @@
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 10.14;
MARKETING_VERSION = 0.52.4;
MARKETING_VERSION = 0.52.5;
PRODUCT_BUNDLE_IDENTIFIER = "com.charcoaldesign.SwiftFormat-for-Xcode";
PRODUCT_NAME = "SwiftFormat for Xcode";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand Down Expand Up @@ -1282,7 +1282,7 @@
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 10.14;
MARKETING_VERSION = 0.52.4;
MARKETING_VERSION = 0.52.5;
PRODUCT_BUNDLE_IDENTIFIER = "com.charcoaldesign.SwiftFormat-for-Xcode";
PRODUCT_NAME = "SwiftFormat for Xcode";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand Down Expand Up @@ -1310,7 +1310,7 @@
"@executable_path/../../../../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 10.14;
MARKETING_VERSION = 0.52.4;
MARKETING_VERSION = 0.52.5;
PRODUCT_BUNDLE_IDENTIFIER = "com.charcoaldesign.SwiftFormat-for-Xcode.SourceEditorExtension";
PRODUCT_NAME = SwiftFormat;
PROVISIONING_PROFILE_SPECIFIER = "";
Expand Down Expand Up @@ -1340,7 +1340,7 @@
"@executable_path/../../../../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 10.14;
MARKETING_VERSION = 0.52.4;
MARKETING_VERSION = 0.52.5;
PRODUCT_BUNDLE_IDENTIFIER = "com.charcoaldesign.SwiftFormat-for-Xcode.SourceEditorExtension";
PRODUCT_NAME = SwiftFormat;
PROVISIONING_PROFILE_SPECIFIER = "";
Expand Down

0 comments on commit 7eb1706

Please sign in to comment.