diff --git a/CHANGELOG.md b/CHANGELOG.md
index 8e582f80e..662110070 100755
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,14 @@
# Change Log
+## [0.40.2](https://github.com/nicklockwood/SwiftFormat/releases/tag/0.40.2) (2019-03-19)
+
+- Fixed a bug where the `redundantParens` rule incorrectly removed parens in a subscript or function invocation
+- Fixed a bug with the `trailingClosures` rule removing parens inside some conditional expressions
+- Fixed a bug in the `yodaConditions` rule that broke expressions containing subscripts
+- Fixed the `--swiftversion` option, which was being ignored under some circumstances
+- Fixed bug that caused the `--fragment` and `--conflictmarkers` options to be ignored
+- Fixed a bug in the `redundantObjc` rule that incorrectly stripped `@objc` from nested enum types
+
## [0.40.1](https://github.com/nicklockwood/SwiftFormat/releases/tag/0.40.1) (2019-03-16)
- Fixed bug where `--trailingclosures` would incorrectly remove parentheses before an opening brace
diff --git a/CommandLineTool/swiftformat b/CommandLineTool/swiftformat
index c804a0cce..4c3195e7d 100755
Binary files a/CommandLineTool/swiftformat and b/CommandLineTool/swiftformat differ
diff --git a/EditorExtension/Application/Info.plist b/EditorExtension/Application/Info.plist
index 85dff935a..5338ade00 100644
--- a/EditorExtension/Application/Info.plist
+++ b/EditorExtension/Application/Info.plist
@@ -32,7 +32,7 @@
CFBundlePackageType
APPL
CFBundleShortVersionString
- 0.40.1
+ 0.40.2
CFBundleVersion
$(CURRENT_PROJECT_VERSION)
LSMinimumSystemVersion
diff --git a/EditorExtension/Extension/Info.plist b/EditorExtension/Extension/Info.plist
index f32c2b596..efa2de8f2 100644
--- a/EditorExtension/Extension/Info.plist
+++ b/EditorExtension/Extension/Info.plist
@@ -15,7 +15,7 @@
CFBundlePackageType
XPC!
CFBundleShortVersionString
- 0.40.1
+ 0.40.2
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 819c55577..c90b48dc0 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.1
+ 0.40.2
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 9195d6f23..7f324465e 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 ce95ac262..a82d53988 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.1
+ 0.40.2
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 81e813a72..a9754b117 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 ef1a7f713..41b611aad 100644
--- a/EditorExtension/SwiftFormat for Xcode.app/Contents/_CodeSignature/CodeResources
+++ b/EditorExtension/SwiftFormat for Xcode.app/Contents/_CodeSignature/CodeResources
@@ -178,7 +178,7 @@
cdhash
- LFo6X4uiyQ2sKl6m+W0REemWAYY=
+ QXa2wVEAjj31ZVuc3PJG6o7ufu4=
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/Sources/Formatter.swift b/Sources/Formatter.swift
index 4541e0e05..f75943ef8 100644
--- a/Sources/Formatter.swift
+++ b/Sources/Formatter.swift
@@ -2,7 +2,7 @@
// Formatter.swift
// SwiftFormat
//
-// Version 0.40.1
+// Version 0.40.2
//
// Created by Nick Lockwood on 12/08/2016.
// Copyright 2016 Nick Lockwood
diff --git a/Sources/Info.plist b/Sources/Info.plist
index a098d1f8d..956d8bae7 100644
--- a/Sources/Info.plist
+++ b/Sources/Info.plist
@@ -15,7 +15,7 @@
CFBundlePackageType
FMWK
CFBundleShortVersionString
- 0.40.1
+ 0.40.2
CFBundleSignature
????
CFBundleVersion
diff --git a/Sources/SwiftFormat.swift b/Sources/SwiftFormat.swift
index f5909ef00..b47399fd4 100644
--- a/Sources/SwiftFormat.swift
+++ b/Sources/SwiftFormat.swift
@@ -32,7 +32,7 @@
import Foundation
/// The current SwiftFormat version
-public let version = "0.40.1"
+public let version = "0.40.2"
/// The standard SwiftFormat config file name
public let swiftFormatConfigurationFile = ".swiftformat"
diff --git a/Sources/Tokenizer.swift b/Sources/Tokenizer.swift
index 0c44a1b92..805e0f1ca 100644
--- a/Sources/Tokenizer.swift
+++ b/Sources/Tokenizer.swift
@@ -2,7 +2,7 @@
// Tokenizer.swift
// SwiftFormat
//
-// Version 0.40.1
+// Version 0.40.2
//
// Created by Nick Lockwood on 11/08/2016.
// Copyright 2016 Nick Lockwood
diff --git a/SwiftFormat.podspec.json b/SwiftFormat.podspec.json
index b228c3e04..200ed510e 100644
--- a/SwiftFormat.podspec.json
+++ b/SwiftFormat.podspec.json
@@ -1,6 +1,6 @@
{
"name": "SwiftFormat",
- "version": "0.40.1",
+ "version": "0.40.2",
"license": {
"type": "MIT",
"file": "LICENSE.md"
@@ -10,7 +10,7 @@
"authors": "Nick Lockwood",
"source": {
"git": "https://github.com/nicklockwood/SwiftFormat.git",
- "tag": "0.40.1"
+ "tag": "0.40.2"
},
"default_subspecs": "Core",
"subspecs": [
diff --git a/Tests/Info.plist b/Tests/Info.plist
index d784e392d..c57dbc6a9 100644
--- a/Tests/Info.plist
+++ b/Tests/Info.plist
@@ -15,7 +15,7 @@
CFBundlePackageType
BNDL
CFBundleShortVersionString
- 0.40.1
+ 0.40.2
CFBundleSignature
????
CFBundleVersion