diff --git a/CHANGELOG.md b/CHANGELOG.md index b272fad2..aa320e98 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,16 @@ # Change Log +## [0.50.9](https://github.com/nicklockwood/SwiftFormat/releases/tag/0.50.9) (2022-02-16) + +- Added Github actions log reporter (see `--reporter` option for details) +- Fixed bug where `redundantType` sometimes stripped in cases where it couldn't be inferred +- The `redundantType` rule now supports removing type in more cases where supported +- Made SwiftFormat for Xcode instructions dynamic according to OS version +- Fixed bug where a trailing comma could be left behind by `opaqueGenericParameters` rule +- Fixed bug where `wrapAttributes` rule sometimes wrapped inline attributes like `@MainActor` +- Improved support for `// swiftformat:options` comment directives +- Removed deprecated options from the example `.swiftformat` file + ## [0.50.8](https://github.com/nicklockwood/SwiftFormat/releases/tag/0.50.8) (2022-01-29) - The `redundantBackticks` rule no longer removes required comments around `self` diff --git a/CommandLineTool/swiftformat b/CommandLineTool/swiftformat index 4212bed1..23abe648 100755 Binary files a/CommandLineTool/swiftformat and b/CommandLineTool/swiftformat differ diff --git a/README.md b/README.md index b22428f7..26183445 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ [![Codecov](https://codecov.io/gh/nicklockwood/SwiftFormat/graphs/badge.svg)](https://codecov.io/gh/nicklockwood/SwiftFormat) [![Swift 4.2](https://img.shields.io/badge/swift-4.2-red.svg?style=flat)](https://developer.apple.com/swift) [![License](https://img.shields.io/badge/license-MIT-lightgrey.svg)](https://opensource.org/licenses/MIT) -[![Twitter](https://img.shields.io/badge/twitter-@nicklockwood-blue.svg)](http://twitter.com/nicklockwood) +[![Mastodon](https://img.shields.io/badge/mastodon-@nicklockwood@mastodon.social-636dff.svg)](https://mastodon.social/@nicklockwood) Table of Contents ----------------- @@ -261,7 +261,8 @@ let package = Package( 1. Click on your project in the file list, choose your target under `TARGETS`, click the `Build Phases` tab 2. Add a `New Run Script Phase` by clicking the little plus icon in the top left -3. Drag the new `Run Script` phase **above** the `Compile Sources` phase, expand it and paste the following script: +3. Uncheck the `Based on dependency analysis` checkbox +4. Drag the new `Run Script` phase **above** the `Compile Sources` phase, expand it and paste the following script: ```bash cd BuildTools @@ -292,7 +293,8 @@ You can also use `swift run -c release --package-path BuildTools swiftformat "$S 1. Click on your project in the file list, choose your target under `TARGETS`, click the `Build Phases` tab 2. Add a `New Run Script Phase` by clicking the little plus icon in the top left -3. Drag the new `Run Script` phase **above** the `Compile Sources` phase, expand it and paste the following script: +3. Uncheck the `Based on dependency analysis` checkbox +4. Drag the new `Run Script` phase **above** the `Compile Sources` phase, expand it and paste the following script: ```bash "${PODS_ROOT}/SwiftFormat/CommandLineTool/swiftformat" "$SRCROOT" @@ -914,7 +916,7 @@ Credits * [Romain Pouclet](https://github.com/palleas) - Homebrew formula * [Aerobounce](https://github.com/aerobounce) - Homebrew cask and Sublime Text plugin * [Cal Stephens](https://github.com/calda) - Several new formatting rules and options -* [Facundo Menzella](https://github.com/acumenzella) - Several new formatting rules +* [Facundo Menzella](https://github.com/facumenzella) - Several new formatting rules * [Ali Akhtarzada](https://github.com/aliak00) - Several path-related CLI enhancements * [Yonas Kolb](https://github.com/yonaskolb) - Swift Package Manager integration * [Wolfgang Lutz](https://github.com/Lutzifer) - AppleScript integration instructions @@ -925,6 +927,7 @@ Credits * [Juri Pakaste](https://github.com/juri) - Filelist feature * [Jim Puls](https://github.com/puls) - Big Sur icon update * [Daniele Formichelli](https://github.com/danyf90) - JSON reporter +* [Jonas Boberg](https://github.com/bobergj) - Github actions log reporter * [Mahdi Bchatnia](https://github.com/inket) - Linux build workflow * [Arthur Semenyutin](https://github.com/vox-humana) - Docker image * [Marco Eidinger](https://github.com/MarcoEidinger) - Swift Package Manager plugin diff --git a/Sources/Formatter.swift b/Sources/Formatter.swift index c27455b3..fa8cc145 100644 --- a/Sources/Formatter.swift +++ b/Sources/Formatter.swift @@ -2,7 +2,7 @@ // Formatter.swift // SwiftFormat // -// Version 0.50.8 +// Version 0.50.9 // // Created by Nick Lockwood on 12/08/2016. // Copyright 2016 Nick Lockwood diff --git a/Sources/SwiftFormat.swift b/Sources/SwiftFormat.swift index 7a61a003..bc11d92c 100644 --- a/Sources/SwiftFormat.swift +++ b/Sources/SwiftFormat.swift @@ -32,7 +32,7 @@ import Foundation /// The current SwiftFormat version -let swiftFormatVersion = "0.50.8" +let swiftFormatVersion = "0.50.9" public let version = swiftFormatVersion /// The standard SwiftFormat config file name diff --git a/Sources/Tokenizer.swift b/Sources/Tokenizer.swift index 6e1ebef2..1a464ab0 100644 --- a/Sources/Tokenizer.swift +++ b/Sources/Tokenizer.swift @@ -2,7 +2,7 @@ // Tokenizer.swift // SwiftFormat // -// Version 0.50.8 +// Version 0.50.9 // // Created by Nick Lockwood on 11/08/2016. // Copyright 2016 Nick Lockwood diff --git a/SwiftFormat.podspec.json b/SwiftFormat.podspec.json index 16c7f73e..7f922b93 100644 --- a/SwiftFormat.podspec.json +++ b/SwiftFormat.podspec.json @@ -1,6 +1,6 @@ { "name": "SwiftFormat", - "version": "0.50.8", + "version": "0.50.9", "license": { "type": "MIT", "file": "LICENSE.md" @@ -10,7 +10,7 @@ "authors": "Nick Lockwood", "source": { "git": "https://github.com/nicklockwood/SwiftFormat.git", - "tag": "0.50.8" + "tag": "0.50.9" }, "default_subspecs": "Core", "subspecs": [ diff --git a/SwiftFormat.xcodeproj/project.pbxproj b/SwiftFormat.xcodeproj/project.pbxproj index 24b51ac6..eadf124b 100644 --- a/SwiftFormat.xcodeproj/project.pbxproj +++ b/SwiftFormat.xcodeproj/project.pbxproj @@ -1105,7 +1105,7 @@ "@loader_path/Frameworks", ); MACOSX_DEPLOYMENT_TARGET = 10.14; - MARKETING_VERSION = 0.50.8; + MARKETING_VERSION = 0.50.9; PRODUCT_BUNDLE_IDENTIFIER = com.charcoaldesign.SwiftFormat; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; @@ -1135,7 +1135,7 @@ "@loader_path/Frameworks", ); MACOSX_DEPLOYMENT_TARGET = 10.14; - MARKETING_VERSION = 0.50.8; + MARKETING_VERSION = 0.50.9; PRODUCT_BUNDLE_IDENTIFIER = com.charcoaldesign.SwiftFormat; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; @@ -1240,7 +1240,7 @@ "@executable_path/../Frameworks", ); MACOSX_DEPLOYMENT_TARGET = 10.14; - MARKETING_VERSION = 0.50.8; + MARKETING_VERSION = 0.50.9; PRODUCT_BUNDLE_IDENTIFIER = "com.charcoaldesign.SwiftFormat-for-Xcode"; PRODUCT_NAME = "SwiftFormat for Xcode"; PROVISIONING_PROFILE_SPECIFIER = ""; @@ -1271,7 +1271,7 @@ "@executable_path/../Frameworks", ); MACOSX_DEPLOYMENT_TARGET = 10.14; - MARKETING_VERSION = 0.50.8; + MARKETING_VERSION = 0.50.9; PRODUCT_BUNDLE_IDENTIFIER = "com.charcoaldesign.SwiftFormat-for-Xcode"; PRODUCT_NAME = "SwiftFormat for Xcode"; PROVISIONING_PROFILE_SPECIFIER = ""; @@ -1299,7 +1299,7 @@ "@executable_path/../../../../Frameworks", ); MACOSX_DEPLOYMENT_TARGET = 10.14; - MARKETING_VERSION = 0.50.8; + MARKETING_VERSION = 0.50.9; PRODUCT_BUNDLE_IDENTIFIER = "com.charcoaldesign.SwiftFormat-for-Xcode.SourceEditorExtension"; PRODUCT_NAME = SwiftFormat; PROVISIONING_PROFILE_SPECIFIER = ""; @@ -1329,7 +1329,7 @@ "@executable_path/../../../../Frameworks", ); MACOSX_DEPLOYMENT_TARGET = 10.14; - MARKETING_VERSION = 0.50.8; + MARKETING_VERSION = 0.50.9; PRODUCT_BUNDLE_IDENTIFIER = "com.charcoaldesign.SwiftFormat-for-Xcode.SourceEditorExtension"; PRODUCT_NAME = SwiftFormat; PROVISIONING_PROFILE_SPECIFIER = "";