diff --git a/CHANGELOG.md b/CHANGELOG.md index b3a6928e..14f600cb 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Change Log +## [0.40.4](https://github.com/nicklockwood/SwiftFormat/releases/tag/0.40.4) (2019-03-23) + +- Multiple instances of `--disable` or other comma-delimited config options are now merged instead of replacing previous +- The `redundantParens` rule no longer removes explicit double-parens used to suppress warnings inside `Selector(...)` +- The `trailingCommas` rule no longer breaks calls to `UICollectionView.performBatchUpdates()` +- Fixed bug in `yodaConditions` rule that broke KeyPaths + ## [0.40.3](https://github.com/nicklockwood/SwiftFormat/releases/tag/0.40.3) (2019-03-19) - Fixed some bugs with the `redundantFileprivate` rule relating to struct members diff --git a/CommandLineTool/swiftformat b/CommandLineTool/swiftformat index d46de1a6..0009b87f 100755 Binary files a/CommandLineTool/swiftformat and b/CommandLineTool/swiftformat differ diff --git a/EditorExtension/Application/Info.plist b/EditorExtension/Application/Info.plist index 0be32285..ea394344 100644 --- a/EditorExtension/Application/Info.plist +++ b/EditorExtension/Application/Info.plist @@ -32,7 +32,7 @@ CFBundlePackageType APPL CFBundleShortVersionString - 0.40.3 + 0.40.4 CFBundleVersion $(CURRENT_PROJECT_VERSION) LSMinimumSystemVersion diff --git a/EditorExtension/Extension/Info.plist b/EditorExtension/Extension/Info.plist index b12e8a56..73aa607a 100644 --- a/EditorExtension/Extension/Info.plist +++ b/EditorExtension/Extension/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType XPC! CFBundleShortVersionString - 0.40.3 + 0.40.4 CFBundleVersion $(CURRENT_PROJECT_VERSION) LSMinimumSystemVersion diff --git a/EditorExtension/SwiftFormat for Xcode.app/Contents/Info.plist b/EditorExtension/SwiftFormat for Xcode.app/Contents/Info.plist index 2ec842e0..3b661e67 100644 --- a/EditorExtension/SwiftFormat for Xcode.app/Contents/Info.plist +++ b/EditorExtension/SwiftFormat for Xcode.app/Contents/Info.plist @@ -32,7 +32,7 @@ CFBundlePackageType APPL CFBundleShortVersionString - 0.40.3 + 0.40.4 CFBundleSupportedPlatforms MacOSX diff --git a/EditorExtension/SwiftFormat for Xcode.app/Contents/MacOS/SwiftFormat for Xcode b/EditorExtension/SwiftFormat for Xcode.app/Contents/MacOS/SwiftFormat for Xcode index e555b773..f580cd25 100755 Binary files a/EditorExtension/SwiftFormat for Xcode.app/Contents/MacOS/SwiftFormat for Xcode and b/EditorExtension/SwiftFormat for Xcode.app/Contents/MacOS/SwiftFormat for Xcode differ diff --git a/EditorExtension/SwiftFormat for Xcode.app/Contents/PlugIns/SwiftFormat.appex/Contents/Info.plist b/EditorExtension/SwiftFormat for Xcode.app/Contents/PlugIns/SwiftFormat.appex/Contents/Info.plist index c40ea34d..6185a1b9 100644 --- a/EditorExtension/SwiftFormat for Xcode.app/Contents/PlugIns/SwiftFormat.appex/Contents/Info.plist +++ b/EditorExtension/SwiftFormat for Xcode.app/Contents/PlugIns/SwiftFormat.appex/Contents/Info.plist @@ -17,7 +17,7 @@ CFBundlePackageType XPC! CFBundleShortVersionString - 0.40.3 + 0.40.4 CFBundleSupportedPlatforms MacOSX diff --git a/EditorExtension/SwiftFormat for Xcode.app/Contents/PlugIns/SwiftFormat.appex/Contents/MacOS/SwiftFormat b/EditorExtension/SwiftFormat for Xcode.app/Contents/PlugIns/SwiftFormat.appex/Contents/MacOS/SwiftFormat index 242b9eb2..4bbb0f09 100755 Binary files a/EditorExtension/SwiftFormat for Xcode.app/Contents/PlugIns/SwiftFormat.appex/Contents/MacOS/SwiftFormat and b/EditorExtension/SwiftFormat for Xcode.app/Contents/PlugIns/SwiftFormat.appex/Contents/MacOS/SwiftFormat differ diff --git a/EditorExtension/SwiftFormat for Xcode.app/Contents/_CodeSignature/CodeResources b/EditorExtension/SwiftFormat for Xcode.app/Contents/_CodeSignature/CodeResources index ca9f4be8..eb6ad936 100644 --- a/EditorExtension/SwiftFormat for Xcode.app/Contents/_CodeSignature/CodeResources +++ b/EditorExtension/SwiftFormat for Xcode.app/Contents/_CodeSignature/CodeResources @@ -178,7 +178,7 @@ cdhash - ehJNQrU7SVChCazJzFyY2VWukZk= + nE3+9yED87rECaCgzOa99duScaw= requirement anchor apple generic and identifier "com.charcoaldesign.SwiftFormat-for-Xcode.SourceEditorExtension" and (certificate leaf[field.1.2.840.113635.100.6.1.9] /* exists */ or certificate 1[field.1.2.840.113635.100.6.2.6] /* exists */ and certificate leaf[field.1.2.840.113635.100.6.1.13] /* exists */ and certificate leaf[subject.OU] = "8VQKF583ED") diff --git a/README.md b/README.md index 731b4442..fd45b11e 100644 --- a/README.md +++ b/README.md @@ -301,9 +301,18 @@ You can disable rules individually using `--disable` followed by a list of one o ```bash --disable redundantSelf,trailingClosures +--enable isEmpty ``` -If you prefer to only run a strict subset of rules, you can pass a comma-delimited list to the`--rules` argument, and it will enable only those rules: +If you prefer, you can place your enabled/disabled rules on separate lines instead of using commas: + +```bash +--disable indent +--disable linebreaks +--disable redundantSelf +``` + +To avoid automatically opting-in to new rules when SwiftFormat is updated, you can use the`--rules` argument to *only* enable the rules you specify: ```bash --rules indent,linebreaks diff --git a/Sources/Formatter.swift b/Sources/Formatter.swift index c42793c5..bcd322b7 100644 --- a/Sources/Formatter.swift +++ b/Sources/Formatter.swift @@ -2,7 +2,7 @@ // Formatter.swift // SwiftFormat // -// Version 0.40.3 +// Version 0.40.4 // // Created by Nick Lockwood on 12/08/2016. // Copyright 2016 Nick Lockwood diff --git a/Sources/Info.plist b/Sources/Info.plist index 51827f2e..1e1d1922 100644 --- a/Sources/Info.plist +++ b/Sources/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 0.40.3 + 0.40.4 CFBundleSignature ???? CFBundleVersion diff --git a/Sources/SwiftFormat.swift b/Sources/SwiftFormat.swift index 51b7e28b..ce98330c 100644 --- a/Sources/SwiftFormat.swift +++ b/Sources/SwiftFormat.swift @@ -32,7 +32,7 @@ import Foundation /// The current SwiftFormat version -public let version = "0.40.3" +public let version = "0.40.4" /// The standard SwiftFormat config file name public let swiftFormatConfigurationFile = ".swiftformat" diff --git a/Sources/Tokenizer.swift b/Sources/Tokenizer.swift index 01f1fc32..9dc3ba94 100644 --- a/Sources/Tokenizer.swift +++ b/Sources/Tokenizer.swift @@ -2,7 +2,7 @@ // Tokenizer.swift // SwiftFormat // -// Version 0.40.3 +// Version 0.40.4 // // Created by Nick Lockwood on 11/08/2016. // Copyright 2016 Nick Lockwood diff --git a/SwiftFormat.podspec.json b/SwiftFormat.podspec.json index 330b0d20..2b76ce75 100644 --- a/SwiftFormat.podspec.json +++ b/SwiftFormat.podspec.json @@ -1,6 +1,6 @@ { "name": "SwiftFormat", - "version": "0.40.3", + "version": "0.40.4", "license": { "type": "MIT", "file": "LICENSE.md" @@ -10,7 +10,7 @@ "authors": "Nick Lockwood", "source": { "git": "https://github.com/nicklockwood/SwiftFormat.git", - "tag": "0.40.3" + "tag": "0.40.4" }, "default_subspecs": "Core", "subspecs": [ diff --git a/Tests/Info.plist b/Tests/Info.plist index a17357a5..c58b2890 100644 --- a/Tests/Info.plist +++ b/Tests/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType BNDL CFBundleShortVersionString - 0.40.3 + 0.40.4 CFBundleSignature ???? CFBundleVersion