diff --git a/CHANGELOG.md b/CHANGELOG.md index ed2aa479..d05b7e07 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,14 @@ # Change Log +## [0.49.4](https://github.com/nicklockwood/SwiftFormat/releases/tag/0.49.4) (2021-02-07) + +- Fixed creation date being modified on formatted files +- Fixed case where a closure inside an if condition was mistaken for the body +- Fixed `blockComments` rule removing leading `*`s used as bullet points +- Fixed bug when parsing a raw string containing three consecutive unescaped quotes +- Fixed spurious warning about unused `--wrapparameters` option +- Fixed edge case when using `--allman` indenting + ## [0.49.3](https://github.com/nicklockwood/SwiftFormat/releases/tag/0.49.3) (2021-01-26) - Fixed required `let` being removed inside View Builders diff --git a/CommandLineTool/swiftformat b/CommandLineTool/swiftformat index bb0783b1..ac703e6e 100755 Binary files a/CommandLineTool/swiftformat and b/CommandLineTool/swiftformat differ diff --git a/README.md b/README.md index 1f12e8a2..3e0b926c 100644 --- a/README.md +++ b/README.md @@ -623,6 +623,13 @@ By default, `--lint` will only report lines that require formatting, but you can If you would prefer not to see a warning for each and every formatting change, you can use the `--quiet` flag to suppress all output except errors. +Sometimes you may wish to autoformat some rules, but only lint others. To do that, use the `--lintonly` option in your config file to specify rules that should only be applied in `--lint` mode: + +``` +--rules braces,indent +--lintonly trailingClosures,unusedArguments +``` + Error codes ----------- diff --git a/Sources/Formatter.swift b/Sources/Formatter.swift index 1642a200..833ef155 100644 --- a/Sources/Formatter.swift +++ b/Sources/Formatter.swift @@ -2,7 +2,7 @@ // Formatter.swift // SwiftFormat // -// Version 0.49.3 +// Version 0.49.4 // // Created by Nick Lockwood on 12/08/2016. // Copyright 2016 Nick Lockwood diff --git a/Sources/SwiftFormat.swift b/Sources/SwiftFormat.swift index c03507bd..99afe546 100644 --- a/Sources/SwiftFormat.swift +++ b/Sources/SwiftFormat.swift @@ -32,7 +32,7 @@ import Foundation /// The current SwiftFormat version -let swiftFormatVersion = "0.49.3" +let swiftFormatVersion = "0.49.4" public let version = swiftFormatVersion /// The standard SwiftFormat config file name diff --git a/Sources/Tokenizer.swift b/Sources/Tokenizer.swift index 0e2e03ec..291e2625 100644 --- a/Sources/Tokenizer.swift +++ b/Sources/Tokenizer.swift @@ -2,7 +2,7 @@ // Tokenizer.swift // SwiftFormat // -// Version 0.49.3 +// Version 0.49.4 // // Created by Nick Lockwood on 11/08/2016. // Copyright 2016 Nick Lockwood diff --git a/SwiftFormat.podspec.json b/SwiftFormat.podspec.json index cbf9ff61..88a9b250 100644 --- a/SwiftFormat.podspec.json +++ b/SwiftFormat.podspec.json @@ -1,6 +1,6 @@ { "name": "SwiftFormat", - "version": "0.49.3", + "version": "0.49.4", "license": { "type": "MIT", "file": "LICENSE.md" @@ -10,7 +10,7 @@ "authors": "Nick Lockwood", "source": { "git": "https://github.com/nicklockwood/SwiftFormat.git", - "tag": "0.49.3" + "tag": "0.49.4" }, "default_subspecs": "Core", "subspecs": [ diff --git a/SwiftFormat.xcodeproj/project.pbxproj b/SwiftFormat.xcodeproj/project.pbxproj index dc04fd68..29b6203e 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.3; + MARKETING_VERSION = 0.49.4; 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.3; + MARKETING_VERSION = 0.49.4; 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.3; + MARKETING_VERSION = 0.49.4; 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.3; + MARKETING_VERSION = 0.49.4; 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.3; + MARKETING_VERSION = 0.49.4; 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.3; + MARKETING_VERSION = 0.49.4; PRODUCT_BUNDLE_IDENTIFIER = "com.charcoaldesign.SwiftFormat-for-Xcode.SourceEditorExtension"; PRODUCT_NAME = SwiftFormat; PROVISIONING_PROFILE_SPECIFIER = "";