Skip to content

Commit

Permalink
Update for 0.49.9 release
Browse files Browse the repository at this point in the history
  • Loading branch information
nicklockwood committed May 16, 2022
1 parent 5134175 commit f8e35f6
Show file tree
Hide file tree
Showing 9 changed files with 20 additions and 12 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Change Log

## [0.49.9](https://github.com/nicklockwood/SwiftFormat/releases/tag/0.49.9) (2022-05-16)

- Fixed bug where trailing comma was incorrectly added inside collection types
- Fixed some cases where `redundantVoidReturnType` failed to remove `Void`
- Fixed `unusedArguments` regression introduced in 0.49.8

## [0.49.8](https://github.com/nicklockwood/SwiftFormat/releases/tag/0.49.8) (2022-05-03)

- Fixed `redundantInit` rule removing required init when instantiating type variables
Expand Down
Binary file modified CommandLineTool/swiftformat
Binary file not shown.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -781,6 +781,8 @@ Known issues
* When using the Xcode Source Editor Extension, the SwiftFormat menu sometimes disappears from Xcode. If this happens, try moving or renaming Xcode temporarily and then changing it back. Failing that, the suggestions in [this thread](https://github.com/nicklockwood/SwiftFormat/issues/494) may help.
* The `redundantVoidReturnType` rule can inadvertently alter the type signature for closures, for example in cases where the closure calls a `@discardableResult` function. To solve this you can either fix it on a per-case basis by adding a `// swiftformat:disable:next redundantVoidReturnType` comment directive to disable the rule for a specific call site, or you can add `--closurevoid preserve` to your [configuration](#configuration) to disable the rule completely for closures (regular functions or methods aren't affected).
* The `redundantType` rule can introduce ambiguous code in certain cases when using the default mode of `--redundanttype inferred`. This can be worked around by by using `--redundanttype explicit`, or by manually removing the redundant type reference on the affected line, or by using the `// swiftformat:disable:next redundantType` comment directive to disable the rule at the call site (or just disable the `redundantType` rule completely).
* If a type initializer or factory method returns an implicitly unwrapped optional value then the `redundantType` rule may remove the explicit type in a situation where it's actually required. To work around this you can either use `--redundanttype explicit`, or use the `// swiftformat:disable:next redundantType` comment directive to disable the rule at the call site (or just disable the `redundantType` rule completely).
Expand Down
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.49.8
// Version 0.49.9
//
// Created by Nick Lockwood on 12/08/2016.
// Copyright 2016 Nick Lockwood
Expand Down
2 changes: 1 addition & 1 deletion Sources/Rules.swift
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ public struct _FormatRules {
public let spaceAroundBrackets = FormatRule(
help: "Add or remove space around square brackets."
) { formatter in
formatter.forEach(.startOfScope("[")) { i, token in
formatter.forEach(.startOfScope("[")) { i, _ in
guard let prevToken = formatter.token(at: i - 1) else {
return
}
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.49.8"
let swiftFormatVersion = "0.49.9"
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.49.8
// Version 0.49.9
//
// 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.49.8",
"version": "0.49.9",
"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.49.8"
"tag": "0.49.9"
},
"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 @@ -1080,7 +1080,7 @@
"@executable_path/../Frameworks",
"@loader_path/Frameworks",
);
MARKETING_VERSION = 0.49.8;
MARKETING_VERSION = 0.49.9;
PRODUCT_BUNDLE_IDENTIFIER = com.charcoaldesign.SwiftFormat;
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
Expand Down Expand Up @@ -1108,7 +1108,7 @@
"@executable_path/../Frameworks",
"@loader_path/Frameworks",
);
MARKETING_VERSION = 0.49.8;
MARKETING_VERSION = 0.49.9;
PRODUCT_BUNDLE_IDENTIFIER = com.charcoaldesign.SwiftFormat;
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
Expand Down Expand Up @@ -1204,7 +1204,7 @@
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 10.14;
MARKETING_VERSION = 0.49.8;
MARKETING_VERSION = 0.49.9;
PRODUCT_BUNDLE_IDENTIFIER = "com.charcoaldesign.SwiftFormat-for-Xcode";
PRODUCT_NAME = "SwiftFormat for Xcode";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand Down Expand Up @@ -1234,7 +1234,7 @@
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 10.14;
MARKETING_VERSION = 0.49.8;
MARKETING_VERSION = 0.49.9;
PRODUCT_BUNDLE_IDENTIFIER = "com.charcoaldesign.SwiftFormat-for-Xcode";
PRODUCT_NAME = "SwiftFormat for Xcode";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand Down Expand Up @@ -1262,7 +1262,7 @@
"@executable_path/../../../../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 10.14;
MARKETING_VERSION = 0.49.8;
MARKETING_VERSION = 0.49.9;
PRODUCT_BUNDLE_IDENTIFIER = "com.charcoaldesign.SwiftFormat-for-Xcode.SourceEditorExtension";
PRODUCT_NAME = SwiftFormat;
PROVISIONING_PROFILE_SPECIFIER = "";
Expand Down Expand Up @@ -1292,7 +1292,7 @@
"@executable_path/../../../../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 10.14;
MARKETING_VERSION = 0.49.8;
MARKETING_VERSION = 0.49.9;
PRODUCT_BUNDLE_IDENTIFIER = "com.charcoaldesign.SwiftFormat-for-Xcode.SourceEditorExtension";
PRODUCT_NAME = SwiftFormat;
PROVISIONING_PROFILE_SPECIFIER = "";
Expand Down

0 comments on commit f8e35f6

Please sign in to comment.