Permalink
Browse files

Updated for 0.35.4 release

  • Loading branch information...
nicklockwood committed Sep 5, 2018
1 parent 2f30825 commit b3936dc24c4a2cac6c69adbd45a755cb24b7ec0f
@@ -1,5 +1,14 @@
# Change Log
## [0.35.4](https://github.com/nicklockwood/SwiftFormat/releases/tag/0.35.4) (2018-09-05)
- Added glob support (unix-style wildcard file pattern matching) for `--exclude` paths
- Added `--quiet` option to disable noncritical output messages when using the swiftformat CLI
- Fixed a bug where an `import func ...` statement caused the `redundantSelf` rule to loop indefinitely
- Disabled ANSI formatting for stderr if stdout is pointing to a terminal interface but stderr isn't
- SwiftFormat is now more tolerant of white space around paths in a .swiftformat configuration file
- A .swiftformat file generated by SwiftFormat will now always end with a linebreak
## [0.35.3](https://github.com/nicklockwood/SwiftFormat/releases/tag/0.35.3) (2018-08-21)
- Added `--closingparen` option for finer control over function argument wrapping
BIN +10.9 KB (100%) CommandLineTool/swiftformat
Binary file not shown.
@@ -17,7 +17,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>0.35.3</string>
<string>0.35.4</string>
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
<key>LSMinimumSystemVersion</key>
@@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>XPC!</string>
<key>CFBundleShortVersionString</key>
<string>0.35.3</string>
<string>0.35.4</string>
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
<key>LSMinimumSystemVersion</key>
@@ -17,7 +17,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>0.35.3</string>
<string>0.35.4</string>
<key>CFBundleSupportedPlatforms</key>
<array>
<string>MacOSX</string>
@@ -17,7 +17,7 @@
<key>CFBundlePackageType</key>
<string>XPC!</string>
<key>CFBundleShortVersionString</key>
<string>0.35.3</string>
<string>0.35.4</string>
<key>CFBundleSupportedPlatforms</key>
<array>
<string>MacOSX</string>
@@ -182,7 +182,7 @@
<dict>
<key>cdhash</key>
<data>
63C7DlrMr3XpwmeIZ4kHnxP/dLA=
oT4kXjD6TWhH4MrBwOxggj82s6c=
</data>
<key>requirement</key>
<string>identifier "com.charcoaldesign.SwiftFormat-for-Xcode.SourceEditorExtension" and anchor apple generic and certificate leaf[subject.CN] = "Mac Developer: Nick Lockwood (XDQ4XJZXHD)" and certificate 1[field.1.2.840.113635.100.6.2.1] /* exists */</string>
@@ -1257,7 +1257,9 @@ And the `{year}` token will be automatically replaced by the current year whenev
Known issues
---------------
* When using the `--self remove` option, the `redundantSelf` rule will remove references to `self` in autoclosure arguments, which may change the meaning of the code, or cause it not to compile. Currently, the only workaround is to use `--disable redundantSelf` to disable the rule for any affected files. If you are using the `--self insert` option then this is not an issue.
* When using the `--self remove` option, the `redundantSelf` rule will remove references to `self` in autoclosure arguments, which may change the meaning of the code, or cause it not to compile. To work around this issue, use the `// swiftformat:disable:next redundantSelf` comment directive to disable the rule for any affected lines of code (or just disable the `redundantSelf` rule completely). If you are using the `--self insert` option then this is not an issue.
* If you assign `SomeClass.self` to a variable and then instantiate an instance of the class using that variable, Swift requires that you use an explicit `.init()`, however the `redundantInit` rule is not currently capable of detecting this situation and will remove the `.init`. To work around this issue, use the `// swiftformat:disable:next redundantInit` comment directive to disable the rule for any affected lines of code (or just disable the `redundantInit` rule completely).
* The `--self insert` option can only recognize locally declared member variables, not ones inherited from superclasses or extensions in other files, so it cannot insert missing `self` references for those. Note that the reverse is not true: `--self remove` should remove *all* redundant `self` references.
@@ -110,7 +110,7 @@ func printHelp(as type: CLI.OutputType) {
--verbose display detailed formatting output and warnings/errors
--quiet disables non-critical output messages and warnings
--dryrun run in "dry" mode (without actually changing any files)
--lint returns non-zero exit code if files would be changed
--lint like --dryrun, but returns an error if formatting is needed
swiftformat has a number of rules that can be enabled or disabled. by default
most rules are enabled. use --rules to display all enabled/disabled rules:
@@ -2,7 +2,7 @@
// Formatter.swift
// SwiftFormat
//
// Version 0.35.3
// Version 0.35.4
//
// Created by Nick Lockwood on 12/08/2016.
// Copyright 2016 Nick Lockwood
@@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>0.35.3</string>
<string>0.35.4</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
@@ -32,7 +32,7 @@
import Foundation
/// The current SwiftFormat version
public let version = "0.35.3"
public let version = "0.35.4"
/// The standard SwiftFormat config file name
public let swiftFormatConfigurationFile = ".swiftformat"
@@ -2,7 +2,7 @@
// Tokenizer.swift
// SwiftFormat
//
// Version 0.35.3
// Version 0.35.4
//
// Created by Nick Lockwood on 11/08/2016.
// Copyright 2016 Nick Lockwood
@@ -1,6 +1,6 @@
{
"name": "SwiftFormat",
"version": "0.35.3",
"version": "0.35.4",
"license": {
"type": "MIT",
"file": "LICENSE.md"
@@ -10,7 +10,7 @@
"authors": "Nick Lockwood",
"source": {
"git": "https://github.com/nicklockwood/SwiftFormat.git",
"tag": "0.35.3"
"tag": "0.35.4"
},
"default_subspecs": "Core",
"subspecs": [
@@ -412,7 +412,7 @@ class ArgumentsTests: XCTestCase {
func testParseExcludesURLsFileOption() throws {
let options = try Options(["exclude": "foo bar, baz"], in: "/dir")
let paths = options.fileOptions?.excludedURLs.map { $0.path }
let paths = options.fileOptions?.excludedURLs.map { $0.path } ?? []
XCTAssertEqual(paths, ["/dir/foo bar", "/dir/baz"])
}
}
@@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleShortVersionString</key>
<string>0.35.3</string>
<string>0.35.4</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>

0 comments on commit b3936dc

Please sign in to comment.