Skip to content

Commit

Permalink
Updated for 0.27.1 release
Browse files Browse the repository at this point in the history
  • Loading branch information
nicklockwood committed Mar 21, 2017
1 parent 6182b04 commit f5a267d
Show file tree
Hide file tree
Showing 31 changed files with 49 additions and 43 deletions.
35 changes: 21 additions & 14 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,16 @@
# Change Log

## [0.27.1](https://github.com/nicklockwood/SwiftFormat/releases/tag/0.27.1) (2017-03-21)

- Fixed trailing space that was incorrectly added to blank lines when `redundantSelf` rule is disabled
- Fixed a bug where `self` could be incorrectly removed when using nested function declarations
- Fixed a bug where `self` could be incorrectly removed inside class functions
- Improved formatting and inferoptions performance

## [0.27.0](https://github.com/nicklockwood/SwiftFormat/releases/tag/0.27.0) (2017-03-17)

- Added `--exclude` command-line option for excluding specific files or folders from formatting
- Improved grouping and logging of errors when using `--verbose` mode
- Improved grouping and logging of formatting errors when running in `--verbose` mode
- Fixed a bug when using prefix operators with with shorthand class or enum members like `-.someValue`
- Fixed some more cases where `self` was incorrectly removed, or wasn't removed when it should have been
- Fixed some cases where backtick escaping was incorrectly removed around reserved words
Expand All @@ -27,7 +34,7 @@

## [0.26.0](https://github.com/nicklockwood/SwiftFormat/releases/tag/0.26.0) (2017-03-13)

- Added `redundantSelf` rule for removing `self.` prefix for member references in cases where it isn't needed
- Added `redundantSelf` rule for removing the `self` prefix from member references in cases where it isn't needed
- Added `--verbose` command-line option for tracking which rules were applied to each file
- Added `--patternlet` command-line option for toggling behavior of the `hoistPatternLet` rule
- Fixed bug where escaped arguments were treated as unused
Expand All @@ -42,18 +49,18 @@
## [0.25.1](https://github.com/nicklockwood/SwiftFormat/releases/tag/0.25.1) (2017-03-08)

- Fixed bug where unused arguments in a failable initializer could be incorrectly formatted
- Fixed bug where backtick escaping would be incorrectly removed from certain keywords
- Fixed bug where backtick escaping would be incorrectly removed from certain reserved identifiers

## [0.25.0](https://github.com/nicklockwood/SwiftFormat/releases/tag/0.25.0) (2017-03-07)

- The `stripHeaders` rule is now `fileHeaders`, which can strip or replace header comments with a custom template (see README for details)
- Added `hoistPatternLet` rule that moves `let` and `var` to the beginning of `switch/case` patterns, or tuple assignments
- The `stripHeaders` rule is now `fileHeaders`, which can strip or replace header comments with a template (see README)
- Added `hoistPatternLet` rule that moves `let` and `var` to the beginning of `switch/case` patterns
- Added `redundantReturn` rule that strips the `return` keyword from single-line closures
- Added `redundantBackticks` rule that removes unnecessary ``escaping`` of keywords
- Added `redundantBackticks` rule that removes unnecessary backtick escaping of keywords

## [0.24.7](https://github.com/nicklockwood/SwiftFormat/releases/tag/0.24.7) (2017-02-28)

- Fixed a bug where switch cases containing a `..<` operator were parsed incorrectly, resulting in incorrect indentation
- Fixed a bug where switch cases containing a `..<` operator were parsed incorrectly, resulting in wrong indentation
- Fixed a potential bug where source code could be truncated after an error when running with `--fragment` enabled
- Command-line tool installation via CocoaPods no longer requires a minimum deployment target of iOS 9 / macOS 10.11

Expand Down Expand Up @@ -112,14 +119,14 @@
## [0.23.1](https://github.com/nicklockwood/SwiftFormat/releases/tag/0.23.1) (2017-01-14)

- Fixed critical bug where closure return types could be mangled by the `unusedArguments` rule
- Fixed issue where console text appeared as black instead of user's chosen default color
- Fixed issue where console text appeared as black instead of the user's chosen default color

## [0.23](https://github.com/nicklockwood/SwiftFormat/releases/tag/0.23) (2017-01-09)

- You can now specify a whitelist of specific rules to apply using the `--rules` option
- Input files are now processed concurrently, yielding a ~2x speed improvement
- SwiftFormat now continues if it encounters an error when processing multiple files
- Improved error messaging, and added color coding to the command line output
- Improved error messaging, and added color-coding to the command-line output
- `--inferoptions` now accepts multiple space-delimited file paths, or piped input, just like formatting
- `redundantVoidReturnType` now removes Void return from closures as well as ordinary functions
- `unusedArguments` now works on closures as well as ordinary functions
Expand Down Expand Up @@ -197,7 +204,7 @@
## [0.16.4](https://github.com/nicklockwood/SwiftFormat/releases/tag/0.16.4) (2016-11-07)

- SwiftFormat is now ~3X faster!
- Fixed bug with spacing after an @convention() attribute
- Fixed bug with spacing after an `@convention()` attribute
- Fixed bug where the space at the start of a multi-line comment could increase after each format
- Fixed bug where wrong indent was applied to wrapped array literal values
- Fixed bug where K&R indenting would remove the linebreak before an inline block
Expand Down Expand Up @@ -229,7 +236,7 @@

## [0.15](https://github.com/nicklockwood/SwiftFormat/releases/tag/0.15) (2016-10-27)

- Added `allman` command line option to enable Allman style indenting instead of K&R style
- Added `allman` command line option to enable Allman-style indenting instead of default K&R style
- Added `removelines` command line option to disable automatic removal of blank lines
- Added `insertlines` command line option to disable automatic blank line insertion
- Added `trimwhitespace` command line option for disabling truncation of blank lines
Expand All @@ -242,7 +249,7 @@

- Xcode Source Editor Extension now automatically infers formatting options from the file
- Wrapped function arguments and array/dictionary literal value indenting now works more like Xcode
- Added `void` rule for normalizing how Void return values are represented
- Added `void` rule for normalizing how `Void` return values are represented
- Added `empty` command line option for configuring the void rule
- Added `commas` command line option for disabling trailing commas
- Improved formatting of fragments containing unbalanced braces
Expand Down Expand Up @@ -274,7 +281,7 @@
## [0.11.3](https://github.com/nicklockwood/SwiftFormat/releases/tag/0.11.3) (2016-10-04)

- Fixed spacing between closure capture list and arguments
- Fixed incorrect indenting of closures after and `if` statement, and other braced clauses
- Fixed incorrect indenting of closures after an `if` statement, and other braced clauses

## [0.11.2](https://github.com/nicklockwood/SwiftFormat/releases/tag/0.11.2) (2016-10-04)

Expand Down Expand Up @@ -315,7 +322,7 @@

## [0.9.4](https://github.com/nicklockwood/SwiftFormat/releases/tag/0.9.4) (2016-09-14)

- Fixed bug where parsing would fail if a `switch/case` statement contained `default` or `case` indentifiers (valid in Swift 3)
- Fixed bug where parsing would fail if a `switch/case` statement contained `default` or `case` identifiers (valid in Swift 3)

## [0.9.3](https://github.com/nicklockwood/SwiftFormat/releases/tag/0.9.3) (2016-09-12)

Expand Down
Binary file modified CommandLineTool/swiftformat
Binary file not shown.
2 changes: 1 addition & 1 deletion EditorExtension/Application/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>0.27.0</string>
<string>0.27.1</string>
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
<key>LSMinimumSystemVersion</key>
Expand Down
2 changes: 1 addition & 1 deletion EditorExtension/Extension/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>XPC!</string>
<key>CFBundleShortVersionString</key>
<string>0.27.0</string>
<string>0.27.1</string>
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
<key>LSMinimumSystemVersion</key>
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>0.27.0</string>
<string>0.27.1</string>
<key>CFBundleSupportedPlatforms</key>
<array>
<string>MacOSX</string>
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<key>CFBundlePackageType</key>
<string>XPC!</string>
<key>CFBundleShortVersionString</key>
<string>0.27.0</string>
<string>0.27.1</string>
<key>CFBundleSupportedPlatforms</key>
<array>
<string>MacOSX</string>
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,23 @@
<dict>
<key>Resources/Base.lproj/Main.storyboardc/Info.plist</key>
<data>
s3hN+0d5xVo4ncHvdYNaxkFOjzw=
eNaly/5P+KLw0dfstobWxRkPh8c=
</data>
<key>Resources/Base.lproj/Main.storyboardc/MainMenu.nib</key>
<data>
x6Mn4/6nRTAdgoXQdwpYFqgdrUQ=
rtKrk+t2hr/PnY5Xz62kkJIZEUQ=
</data>
<key>Resources/Base.lproj/Main.storyboardc/NSWindowController-B8D-0N-5wS.nib</key>
<data>
ko7adTwZIE02lRMrOLOib3MpgbQ=
yKusWdyUSEkt1u4NLbUNk+aY7b4=
</data>
<key>Resources/Base.lproj/Main.storyboardc/ViewController.nib</key>
<data>
qMdVFVk7fXLK3fX+tEZTmgFinhI=
UuJzVOrd/BiUzomMHHBqevNueLs=
</data>
<key>Resources/Base.lproj/Main.storyboardc/XfG-lQ-9wD-view-m2S-Jp-Qdl.nib</key>
<data>
kb30K473+cggYqTx49UMtYe/DrY=
o4Ww08nonoSrrNGDHECY+IvT0NQ=
</data>
<key>Resources/libswiftRemoteMirror.dylib</key>
<data>
Expand Down Expand Up @@ -143,7 +143,7 @@
<dict>
<key>cdhash</key>
<data>
PhGDlo9XixCO8Wl9qMRaLWgcfXQ=
9QmJeIj9FnkQ8WsMYYadH90PjBQ=
</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>
Expand All @@ -152,55 +152,55 @@
<dict>
<key>hash</key>
<data>
s3hN+0d5xVo4ncHvdYNaxkFOjzw=
eNaly/5P+KLw0dfstobWxRkPh8c=
</data>
<key>hash2</key>
<data>
pqOQ8Qh8DCZdr+cow1KGa3r7PjO2IKH0Dre0SihcJn8=
XexXaQC8giLSWKXQblE3A1Jp0dRfqEcc/A15ntSucIE=
</data>
</dict>
<key>Resources/Base.lproj/Main.storyboardc/MainMenu.nib</key>
<dict>
<key>hash</key>
<data>
x6Mn4/6nRTAdgoXQdwpYFqgdrUQ=
rtKrk+t2hr/PnY5Xz62kkJIZEUQ=
</data>
<key>hash2</key>
<data>
sxwszUdIitQ7xNrV2k2PkyxQdxco4mftSZXZa4//WAI=
XxkCGSKS3i4Djuk2GioySPbgs5InnCxWuv2QUoYzys0=
</data>
</dict>
<key>Resources/Base.lproj/Main.storyboardc/NSWindowController-B8D-0N-5wS.nib</key>
<dict>
<key>hash</key>
<data>
ko7adTwZIE02lRMrOLOib3MpgbQ=
yKusWdyUSEkt1u4NLbUNk+aY7b4=
</data>
<key>hash2</key>
<data>
4CUsUFnFQ9XUxLvQQ8mJ3O5ctHSUZZNJhutyDY9qGRs=
xA51IzPLkrFb2djd1j+oSe4vYZUZdH4KG9+cpJUH8Us=
</data>
</dict>
<key>Resources/Base.lproj/Main.storyboardc/ViewController.nib</key>
<dict>
<key>hash</key>
<data>
qMdVFVk7fXLK3fX+tEZTmgFinhI=
UuJzVOrd/BiUzomMHHBqevNueLs=
</data>
<key>hash2</key>
<data>
pmYboms3CGm0Jz/k3Zti6RTH96NGKFoRtMQNooerVt0=
7BRZ1Hzx/QThlYqNWzxMWvYuKDHchZLSrGmfJ1hOoZQ=
</data>
</dict>
<key>Resources/Base.lproj/Main.storyboardc/XfG-lQ-9wD-view-m2S-Jp-Qdl.nib</key>
<dict>
<key>hash</key>
<data>
kb30K473+cggYqTx49UMtYe/DrY=
o4Ww08nonoSrrNGDHECY+IvT0NQ=
</data>
<key>hash2</key>
<data>
On1LlHqj/B1G8CDg/Y3zC9TRn35kIZlwi2MHBYd1jKA=
Z53y6hNofC9a/Hdrr0iJpgQXXzwc5oGgvguGD3HA32w=
</data>
</dict>
<key>Resources/libswiftRemoteMirror.dylib</key>
Expand Down
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -601,7 +601,7 @@ Known issues

let foo: Dictionary<String, String>=["Hello": "World"]
To work around this, either manually add a space between the `>` and `=` characters to eliminate the ambiguity, or add `--disable spaceAroundOperators` to the command-line options.
To work around this, either manually add spaces around the `=` character to eliminate the ambiguity, or add `--disable spaceAroundOperators` to the command-line options.

* If a file begins with a comment, the `stripHeaders` rule will remove it if is followed by a blank line. To avoid this, make sure that the first comment is directly followed by a line of code.

Expand Down Expand Up @@ -649,17 +649,16 @@ Known issues

* The formatted file cache is based on file length, so it's possible (though unlikely) that an edited file will have the exact same character count as the previously formatted version, causing SwiftFormat to incorrectly identify it as not having changed, and fail to format it.

To fix this, you can type an extra space in the file (which SwiftFormat will then remove again when it applies the formatting).
To fix this, you can use the command line option `--cache ignore` to force SwiftFormat to ignore the cache for this run, or just type an extra space in the file (which SwiftFormat will then remove again when it applies the formatting).

Alternatively, use the command line option `--cache ignore` to force SwiftFormat to ignore the cache for this run.


Credits
------------

* @tonyarnold - Xcode Source Editor Extension
* @bourvill - Git pre-commit hook script
* @palleas - Homebrew formula
* @aliak00 - Several path-related CLI enhancements
* @nicklockwood - Everything else

([Full list of contributors](https://github.com/nicklockwood/SwiftFormat/graphs/contributors))
2 changes: 1 addition & 1 deletion Sources/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>0.27.0</string>
<string>0.27.1</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
Expand Down
2 changes: 1 addition & 1 deletion Sources/SwiftFormat.swift
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
import Foundation

/// The current SwiftFormat version
public let version = "0.27.0"
public let version = "0.27.1"

/// An enumeration of the types of error that may be thrown by SwiftFormat
public enum FormatError: Error, CustomStringConvertible {
Expand Down
4 changes: 2 additions & 2 deletions SwiftFormat.podspec.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "SwiftFormat",
"version": "0.27.0",
"version": "0.27.1",
"license": {
"type": "zlib",
"file": "LICENCE.md"
Expand All @@ -10,7 +10,7 @@
"authors": "Nick Lockwood",
"source": {
"git": "https://github.com/nicklockwood/SwiftFormat.git",
"tag": "0.27.0"
"tag": "0.27.1"
},
"default_subspecs": "Core",
"subspecs": [
Expand Down
2 changes: 1 addition & 1 deletion Tests/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleShortVersionString</key>
<string>0.27.0</string>
<string>0.27.1</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
Expand Down

0 comments on commit f5a267d

Please sign in to comment.