diff --git a/.gitignore b/.gitignore index 142b72ca..62970fc4 100644 --- a/.gitignore +++ b/.gitignore @@ -22,6 +22,7 @@ DerivedData .swiftpm /Snapshots/Private +swiftformat.artifactbundle.zip # AppCode .idea diff --git a/CHANGELOG.md b/CHANGELOG.md index 79bfd247..94a0782b 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,14 @@ # Change Log +## [0.49.12](https://github.com/nicklockwood/SwiftFormat/releases/tag/0.49.12) (2022-07-13) + +- Fix bug with parsing ternary chains containing chevron +- Add another fix for `/` operator +- Fix indent after wrapped closure `in` +- Improve rule search in SwiftFormat for Xcode app +- Fix enum popups in SwiftFormat for Xcode options +- Added prebuilt SPM binary target + ## [0.49.11](https://github.com/nicklockwood/SwiftFormat/releases/tag/0.49.11) (2022-06-22) - Fixed parsing of prefix `/` operator (as used in CasePath library) diff --git a/CommandLineTool/swiftformat b/CommandLineTool/swiftformat index 1e3d86d0..4862095c 100755 Binary files a/CommandLineTool/swiftformat and b/CommandLineTool/swiftformat differ diff --git a/README.md b/README.md index 29d50361..31c6c507 100644 --- a/README.md +++ b/README.md @@ -92,12 +92,6 @@ Alternatively, you can install the tool on macOS or Linux by using [Mint](https: $ mint install nicklockwood/SwiftFormat ``` -And then run it using: - -```bash -$ mint run swiftformat -``` - Or if you prefer, you can check out and build SwiftFormat manually on macOS, Linux or Windows as follows: ```bash @@ -108,6 +102,16 @@ $ swift build -c release If you are installing SwiftFormat into your project directory, you can use [CocoaPods](https://cocoapods.org/) on macOS to automatically install the swiftformat binary along with your other pods - see the Xcode build phase instructions below for details. +Another option is to include the binary artifactbundle in your `Package.swift`: + +```swift +.binaryTarget( + name: "SwiftFormat", + url: "https://github.com/nicklockwood/SwiftFormat/releases/download/0.49.12/swiftformat-macos.artifactbundle.zip", + checksum: "CHECKSUM" +), +``` + If you would prefer not to use a package manager, you can build the command-line app manually: 1. open `SwiftFormat.xcodeproj` and build the `SwiftFormat (Application)` scheme. diff --git a/Sources/Formatter.swift b/Sources/Formatter.swift index 2fae6d94..b1b7a894 100644 --- a/Sources/Formatter.swift +++ b/Sources/Formatter.swift @@ -2,7 +2,7 @@ // Formatter.swift // SwiftFormat // -// Version 0.49.11 +// Version 0.49.12 // // Created by Nick Lockwood on 12/08/2016. // Copyright 2016 Nick Lockwood diff --git a/Sources/SwiftFormat.swift b/Sources/SwiftFormat.swift index bf95c80e..12eb54d1 100644 --- a/Sources/SwiftFormat.swift +++ b/Sources/SwiftFormat.swift @@ -32,7 +32,7 @@ import Foundation /// The current SwiftFormat version -let swiftFormatVersion = "0.49.11" +let swiftFormatVersion = "0.49.12" public let version = swiftFormatVersion /// The standard SwiftFormat config file name diff --git a/Sources/Tokenizer.swift b/Sources/Tokenizer.swift index 63b0c74f..bf13dd5c 100644 --- a/Sources/Tokenizer.swift +++ b/Sources/Tokenizer.swift @@ -2,7 +2,7 @@ // Tokenizer.swift // SwiftFormat // -// Version 0.49.11 +// Version 0.49.12 // // Created by Nick Lockwood on 11/08/2016. // Copyright 2016 Nick Lockwood diff --git a/SwiftFormat.podspec.json b/SwiftFormat.podspec.json index 6ee2c757..68dc8c9b 100644 --- a/SwiftFormat.podspec.json +++ b/SwiftFormat.podspec.json @@ -1,6 +1,6 @@ { "name": "SwiftFormat", - "version": "0.49.11", + "version": "0.49.12", "license": { "type": "MIT", "file": "LICENSE.md" @@ -10,7 +10,7 @@ "authors": "Nick Lockwood", "source": { "git": "https://github.com/nicklockwood/SwiftFormat.git", - "tag": "0.49.11" + "tag": "0.49.12" }, "default_subspecs": "Core", "subspecs": [ diff --git a/SwiftFormat.xcodeproj/project.pbxproj b/SwiftFormat.xcodeproj/project.pbxproj index 6f19ac6a..0d53ee72 100644 --- a/SwiftFormat.xcodeproj/project.pbxproj +++ b/SwiftFormat.xcodeproj/project.pbxproj @@ -1080,7 +1080,7 @@ "@executable_path/../Frameworks", "@loader_path/Frameworks", ); - MARKETING_VERSION = 0.49.11; + MARKETING_VERSION = 0.49.12; PRODUCT_BUNDLE_IDENTIFIER = com.charcoaldesign.SwiftFormat; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; @@ -1108,7 +1108,7 @@ "@executable_path/../Frameworks", "@loader_path/Frameworks", ); - MARKETING_VERSION = 0.49.11; + MARKETING_VERSION = 0.49.12; PRODUCT_BUNDLE_IDENTIFIER = com.charcoaldesign.SwiftFormat; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; @@ -1204,7 +1204,7 @@ "@executable_path/../Frameworks", ); MACOSX_DEPLOYMENT_TARGET = 10.14; - MARKETING_VERSION = 0.49.11; + MARKETING_VERSION = 0.49.12; PRODUCT_BUNDLE_IDENTIFIER = "com.charcoaldesign.SwiftFormat-for-Xcode"; PRODUCT_NAME = "SwiftFormat for Xcode"; PROVISIONING_PROFILE_SPECIFIER = ""; @@ -1234,7 +1234,7 @@ "@executable_path/../Frameworks", ); MACOSX_DEPLOYMENT_TARGET = 10.14; - MARKETING_VERSION = 0.49.11; + MARKETING_VERSION = 0.49.12; PRODUCT_BUNDLE_IDENTIFIER = "com.charcoaldesign.SwiftFormat-for-Xcode"; PRODUCT_NAME = "SwiftFormat for Xcode"; PROVISIONING_PROFILE_SPECIFIER = ""; @@ -1262,7 +1262,7 @@ "@executable_path/../../../../Frameworks", ); MACOSX_DEPLOYMENT_TARGET = 10.14; - MARKETING_VERSION = 0.49.11; + MARKETING_VERSION = 0.49.12; PRODUCT_BUNDLE_IDENTIFIER = "com.charcoaldesign.SwiftFormat-for-Xcode.SourceEditorExtension"; PRODUCT_NAME = SwiftFormat; PROVISIONING_PROFILE_SPECIFIER = ""; @@ -1292,7 +1292,7 @@ "@executable_path/../../../../Frameworks", ); MACOSX_DEPLOYMENT_TARGET = 10.14; - MARKETING_VERSION = 0.49.11; + MARKETING_VERSION = 0.49.12; PRODUCT_BUNDLE_IDENTIFIER = "com.charcoaldesign.SwiftFormat-for-Xcode.SourceEditorExtension"; PRODUCT_NAME = SwiftFormat; PROVISIONING_PROFILE_SPECIFIER = "";