diff --git a/CHANGELOG.md b/CHANGELOG.md index a91b1e2c..e1491c20 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,36 +1,50 @@ # Change Log -## [0.48.11](https://github.com/nicklockwood/SwiftFormat/releases/tag/0.48.11) (2020-07-20) +## [0.48.12](https://github.com/nicklockwood/SwiftFormat/releases/tag/0.48.12) (2021-10-02) + +- The `redundantSelf` rule now removes `self` from shadowed variable references where permitted +- Fixed bug where `self` was not correctly removed on the line following an assignment +- Fixed some cases where `self` was incorrectly removed from `@dynamicMemberLookup` members +- Fixed error raised where removing `self` caused ambiguity with global Swift functions +- Function parameters with shadowed names are now correctly marked as unused +- The `--selfrequired` option now applies to members, not just `@autoclosure` arguments +- Fixed trailing comment placement when using `wrapEnumCases` rule +- Fixed indenting of wrapped chained functions after a closing paren or square bracket +- Fixed bug where `some(Void)` was converted to `someVoid` +- Fixed potential range bounds crash in `editDistance()` function +- Now uses automatic test discovery on Linux instead of XCTestManifests file + +## [0.48.11](https://github.com/nicklockwood/SwiftFormat/releases/tag/0.48.11) (2021-07-20) - Fixed parsing error introduced in 0.48.10 involving inline closures inside conditional statements - Fixed bug where `redundantSelf` could potentially misidentify tuple labels as local variables -## [0.48.10](https://github.com/nicklockwood/SwiftFormat/releases/tag/0.48.10) (2020-07-18) +## [0.48.10](https://github.com/nicklockwood/SwiftFormat/releases/tag/0.48.10) (2021-07-18) - Fixed issue with `redundantBackticks` rule incorrectly removing required backticks around underscore - Fixed parsing error in `redundantSelf` with guard conditions containing inline closures -## [0.48.9](https://github.com/nicklockwood/SwiftFormat/releases/tag/0.48.9) (2020-07-09) +## [0.48.9](https://github.com/nicklockwood/SwiftFormat/releases/tag/0.48.9) (2021-07-09) - Fixed regression introduced in 0.48.7 where parens around prefix expressions were incorrectly removed -## [0.48.8](https://github.com/nicklockwood/SwiftFormat/releases/tag/0.48.8) (2020-07-08) +## [0.48.8](https://github.com/nicklockwood/SwiftFormat/releases/tag/0.48.8) (2021-07-08) - Fixed regression introduced in 0.48.7 where parens around operator literals were incorrectly removed -## [0.48.7](https://github.com/nicklockwood/SwiftFormat/releases/tag/0.48.7) (2020-07-07) +## [0.48.7](https://github.com/nicklockwood/SwiftFormat/releases/tag/0.48.7) (2021-07-07) - Fixed bug where `redundantParens` rule could introduce an ambiguity by removing parens around a range argument - Fixed bug where `unowned(unsafe)` capture argument would be mangled by `unusedArguments` rule - Fixed spurious double-indenting of trailing closures in some cases -## [0.48.6](https://github.com/nicklockwood/SwiftFormat/releases/tag/0.48.6) (2020-06-23) +## [0.48.6](https://github.com/nicklockwood/SwiftFormat/releases/tag/0.48.6) (2021-06-23) - Fixed bug where `actor` variables were incorrectly interpreted as a keyword in certain cases - The `redundantBackticks` rule no longer removes required backticks around `actor` properties - Doc comments containing TODO: are no longer converted to regular comments if it would mangle the docs -## [0.48.5](https://github.com/nicklockwood/SwiftFormat/releases/tag/0.48.5) (2020-06-15) +## [0.48.5](https://github.com/nicklockwood/SwiftFormat/releases/tag/0.48.5) (2021-06-15) - Fixed bug when parsing generic result builder attributes, leading to incorrect spacing - Fixed bug where wrapped function body was not double-indented as it should have been @@ -38,7 +52,7 @@ - Fixed bug where space was incorrectly removed between closure capture list and arguments - Fixed bug with indenting of wrapped method chains -## [0.48.4](https://github.com/nicklockwood/SwiftFormat/releases/tag/0.48.4) (2020-05-30) +## [0.48.4](https://github.com/nicklockwood/SwiftFormat/releases/tag/0.48.4) (2021-05-30) - Added support for `actor` and other async/await syntax introduced in Swift 5.5 - Functions with `@Sendable` closure parameters are now formatted correctly @@ -47,18 +61,18 @@ - The `--typeattributes` option now applies to extension attributes as well as type declarations - Improved indentation for accessors/method calls in multiline conditionals -## [0.48.3](https://github.com/nicklockwood/SwiftFormat/releases/tag/0.48.3) (2020-05-22) +## [0.48.3](https://github.com/nicklockwood/SwiftFormat/releases/tag/0.48.3) (2021-05-22) - Fixed bug where files would not be correctly excluded when using `--stdinpath` - Fixed bug with `typeSugar` rule affecting optional composed protocol types - Fixed bug where `hoistPatternLet` would incorrectly add let before `nil` or `true`/`false` -## [0.48.2](https://github.com/nicklockwood/SwiftFormat/releases/tag/0.48.2) (2020-05-16) +## [0.48.2](https://github.com/nicklockwood/SwiftFormat/releases/tag/0.48.2) (2021-05-16) - Fixed wrapping of generic property wrapper attributes - Fixed bug where trailing comma could be inserted inside a collection type signature -## [0.48.1](https://github.com/nicklockwood/SwiftFormat/releases/tag/0.48.1) (2020-05-08) +## [0.48.1](https://github.com/nicklockwood/SwiftFormat/releases/tag/0.48.1) (2021-05-08) - Fixed bug where `typeSugar` rule triggered a Swift bug inside case statements - Fixed double-indenting of trailing closure body on a wrapped line @@ -70,7 +84,7 @@ - Fixed spurious space inserted in generic result builder attributes - Successive reads of the same configuration file while formatting are now cached to improve performance -## [0.48.0](https://github.com/nicklockwood/SwiftFormat/releases/tag/0.48.0) (2020-04-20) +## [0.48.0](https://github.com/nicklockwood/SwiftFormat/releases/tag/0.48.0) (2021-04-20) - Added `--emptybraces` option to control how empty braces are formatted - The `redundantReturn` rule now removes redundant `return` statements in Void functions @@ -86,7 +100,7 @@ - Added `--report` argument for exporting formatting changes or lint violations as a JSON file - Improved tab layout in SwiftFormat for Xcode companion app -## [0.47.13](https://github.com/nicklockwood/SwiftFormat/releases/tag/0.47.13) (2020-03-21) +## [0.47.13](https://github.com/nicklockwood/SwiftFormat/releases/tag/0.47.13) (2021-03-21) - Fixed bug where `--wrapreturntype if-multiline` would unexpectedly wrap a single-line method - Multiline chained functions are now indented correctly when using `--xcodeindentation` @@ -97,7 +111,7 @@ - Trailing commas are no longer incorrectly inserted inside wrapped type signatures - Added `--lintonly` argument to specify rules that should only be applied in `--lint` mode -## [0.47.12](https://github.com/nicklockwood/SwiftFormat/releases/tag/0.47.12) (2020-02-23) +## [0.47.12](https://github.com/nicklockwood/SwiftFormat/releases/tag/0.47.12) (2021-02-23) - Fixed indenting of `switch` cases inside `#if`/`#endif` clauses - Explicit `self` is no longer removed inside types using `@dynamicMemberLookup` @@ -106,7 +120,7 @@ - Fixed issue where single line method after array would wrap unexpectedly - Made repository checkoutable on Windows -## [0.47.11](https://github.com/nicklockwood/SwiftFormat/releases/tag/0.47.11) (2020-01-29) +## [0.47.11](https://github.com/nicklockwood/SwiftFormat/releases/tag/0.47.11) (2021-01-29) - Fixed bug with `redundandSelf` rule sometimes inserting `self` for a local variable - Fixed `wrapAttributes` rule not working for convenience `init`s, or vars with `private(set)` diff --git a/CommandLineTool/swiftformat b/CommandLineTool/swiftformat index b1e90a05..fe3c71d4 100755 Binary files a/CommandLineTool/swiftformat and b/CommandLineTool/swiftformat differ diff --git a/EditorExtension/SwiftFormat for Xcode.app/Contents/CodeResources b/EditorExtension/SwiftFormat for Xcode.app/Contents/CodeResources index 24bd0997..16715a9f 100644 Binary files a/EditorExtension/SwiftFormat for Xcode.app/Contents/CodeResources and b/EditorExtension/SwiftFormat for Xcode.app/Contents/CodeResources differ diff --git a/EditorExtension/SwiftFormat for Xcode.app/Contents/Frameworks/libswiftAppKit.dylib b/EditorExtension/SwiftFormat for Xcode.app/Contents/Frameworks/libswiftAppKit.dylib index 4b47c880..50fe948b 100755 Binary files a/EditorExtension/SwiftFormat for Xcode.app/Contents/Frameworks/libswiftAppKit.dylib and b/EditorExtension/SwiftFormat for Xcode.app/Contents/Frameworks/libswiftAppKit.dylib differ diff --git a/EditorExtension/SwiftFormat for Xcode.app/Contents/Frameworks/libswiftCloudKit.dylib b/EditorExtension/SwiftFormat for Xcode.app/Contents/Frameworks/libswiftCloudKit.dylib index ed89923c..4f8aeed8 100755 Binary files a/EditorExtension/SwiftFormat for Xcode.app/Contents/Frameworks/libswiftCloudKit.dylib and b/EditorExtension/SwiftFormat for Xcode.app/Contents/Frameworks/libswiftCloudKit.dylib differ diff --git a/EditorExtension/SwiftFormat for Xcode.app/Contents/Frameworks/libswiftContacts.dylib b/EditorExtension/SwiftFormat for Xcode.app/Contents/Frameworks/libswiftContacts.dylib index 36edf9fe..571c170c 100755 Binary files a/EditorExtension/SwiftFormat for Xcode.app/Contents/Frameworks/libswiftContacts.dylib and b/EditorExtension/SwiftFormat for Xcode.app/Contents/Frameworks/libswiftContacts.dylib differ diff --git a/EditorExtension/SwiftFormat for Xcode.app/Contents/Frameworks/libswiftCore.dylib b/EditorExtension/SwiftFormat for Xcode.app/Contents/Frameworks/libswiftCore.dylib index c36223f8..4a997499 100755 Binary files a/EditorExtension/SwiftFormat for Xcode.app/Contents/Frameworks/libswiftCore.dylib and b/EditorExtension/SwiftFormat for Xcode.app/Contents/Frameworks/libswiftCore.dylib differ diff --git a/EditorExtension/SwiftFormat for Xcode.app/Contents/Frameworks/libswiftCoreData.dylib b/EditorExtension/SwiftFormat for Xcode.app/Contents/Frameworks/libswiftCoreData.dylib index 3c84ba89..efad1d99 100755 Binary files a/EditorExtension/SwiftFormat for Xcode.app/Contents/Frameworks/libswiftCoreData.dylib and b/EditorExtension/SwiftFormat for Xcode.app/Contents/Frameworks/libswiftCoreData.dylib differ diff --git a/EditorExtension/SwiftFormat for Xcode.app/Contents/Frameworks/libswiftCoreFoundation.dylib b/EditorExtension/SwiftFormat for Xcode.app/Contents/Frameworks/libswiftCoreFoundation.dylib index 7f8e4f6a..1c67dbff 100755 Binary files a/EditorExtension/SwiftFormat for Xcode.app/Contents/Frameworks/libswiftCoreFoundation.dylib and b/EditorExtension/SwiftFormat for Xcode.app/Contents/Frameworks/libswiftCoreFoundation.dylib differ diff --git a/EditorExtension/SwiftFormat for Xcode.app/Contents/Frameworks/libswiftCoreGraphics.dylib b/EditorExtension/SwiftFormat for Xcode.app/Contents/Frameworks/libswiftCoreGraphics.dylib index a04be2d5..214cd575 100755 Binary files a/EditorExtension/SwiftFormat for Xcode.app/Contents/Frameworks/libswiftCoreGraphics.dylib and b/EditorExtension/SwiftFormat for Xcode.app/Contents/Frameworks/libswiftCoreGraphics.dylib differ diff --git a/EditorExtension/SwiftFormat for Xcode.app/Contents/Frameworks/libswiftCoreImage.dylib b/EditorExtension/SwiftFormat for Xcode.app/Contents/Frameworks/libswiftCoreImage.dylib index c8404a40..3867883c 100755 Binary files a/EditorExtension/SwiftFormat for Xcode.app/Contents/Frameworks/libswiftCoreImage.dylib and b/EditorExtension/SwiftFormat for Xcode.app/Contents/Frameworks/libswiftCoreImage.dylib differ diff --git a/EditorExtension/SwiftFormat for Xcode.app/Contents/Frameworks/libswiftCoreLocation.dylib b/EditorExtension/SwiftFormat for Xcode.app/Contents/Frameworks/libswiftCoreLocation.dylib index 292f9ba5..3bf297a3 100755 Binary files a/EditorExtension/SwiftFormat for Xcode.app/Contents/Frameworks/libswiftCoreLocation.dylib and b/EditorExtension/SwiftFormat for Xcode.app/Contents/Frameworks/libswiftCoreLocation.dylib differ diff --git a/EditorExtension/SwiftFormat for Xcode.app/Contents/Frameworks/libswiftDarwin.dylib b/EditorExtension/SwiftFormat for Xcode.app/Contents/Frameworks/libswiftDarwin.dylib index f2e8f4b1..446d6c1f 100755 Binary files a/EditorExtension/SwiftFormat for Xcode.app/Contents/Frameworks/libswiftDarwin.dylib and b/EditorExtension/SwiftFormat for Xcode.app/Contents/Frameworks/libswiftDarwin.dylib differ diff --git a/EditorExtension/SwiftFormat for Xcode.app/Contents/Frameworks/libswiftDispatch.dylib b/EditorExtension/SwiftFormat for Xcode.app/Contents/Frameworks/libswiftDispatch.dylib index a97a518e..7d4e82e5 100755 Binary files a/EditorExtension/SwiftFormat for Xcode.app/Contents/Frameworks/libswiftDispatch.dylib and b/EditorExtension/SwiftFormat for Xcode.app/Contents/Frameworks/libswiftDispatch.dylib differ diff --git a/EditorExtension/SwiftFormat for Xcode.app/Contents/Frameworks/libswiftFoundation.dylib b/EditorExtension/SwiftFormat for Xcode.app/Contents/Frameworks/libswiftFoundation.dylib index 310f8bf0..1f0fb1d1 100755 Binary files a/EditorExtension/SwiftFormat for Xcode.app/Contents/Frameworks/libswiftFoundation.dylib and b/EditorExtension/SwiftFormat for Xcode.app/Contents/Frameworks/libswiftFoundation.dylib differ diff --git a/EditorExtension/SwiftFormat for Xcode.app/Contents/Frameworks/libswiftIOKit.dylib b/EditorExtension/SwiftFormat for Xcode.app/Contents/Frameworks/libswiftIOKit.dylib index 14cd265a..da121977 100755 Binary files a/EditorExtension/SwiftFormat for Xcode.app/Contents/Frameworks/libswiftIOKit.dylib and b/EditorExtension/SwiftFormat for Xcode.app/Contents/Frameworks/libswiftIOKit.dylib differ diff --git a/EditorExtension/SwiftFormat for Xcode.app/Contents/Frameworks/libswiftMetal.dylib b/EditorExtension/SwiftFormat for Xcode.app/Contents/Frameworks/libswiftMetal.dylib index d6d1cd21..fef2343b 100755 Binary files a/EditorExtension/SwiftFormat for Xcode.app/Contents/Frameworks/libswiftMetal.dylib and b/EditorExtension/SwiftFormat for Xcode.app/Contents/Frameworks/libswiftMetal.dylib differ diff --git a/EditorExtension/SwiftFormat for Xcode.app/Contents/Frameworks/libswiftObjectiveC.dylib b/EditorExtension/SwiftFormat for Xcode.app/Contents/Frameworks/libswiftObjectiveC.dylib index aa7da47b..b73eee32 100755 Binary files a/EditorExtension/SwiftFormat for Xcode.app/Contents/Frameworks/libswiftObjectiveC.dylib and b/EditorExtension/SwiftFormat for Xcode.app/Contents/Frameworks/libswiftObjectiveC.dylib differ diff --git a/EditorExtension/SwiftFormat for Xcode.app/Contents/Frameworks/libswiftQuartzCore.dylib b/EditorExtension/SwiftFormat for Xcode.app/Contents/Frameworks/libswiftQuartzCore.dylib index f63bc209..335dd2e3 100755 Binary files a/EditorExtension/SwiftFormat for Xcode.app/Contents/Frameworks/libswiftQuartzCore.dylib and b/EditorExtension/SwiftFormat for Xcode.app/Contents/Frameworks/libswiftQuartzCore.dylib differ diff --git a/EditorExtension/SwiftFormat for Xcode.app/Contents/Frameworks/libswiftXPC.dylib b/EditorExtension/SwiftFormat for Xcode.app/Contents/Frameworks/libswiftXPC.dylib index c18b4343..8679c6cd 100755 Binary files a/EditorExtension/SwiftFormat for Xcode.app/Contents/Frameworks/libswiftXPC.dylib and b/EditorExtension/SwiftFormat for Xcode.app/Contents/Frameworks/libswiftXPC.dylib differ diff --git a/EditorExtension/SwiftFormat for Xcode.app/Contents/Frameworks/libswiftos.dylib b/EditorExtension/SwiftFormat for Xcode.app/Contents/Frameworks/libswiftos.dylib index 55eb0a75..5e6d0a1a 100755 Binary files a/EditorExtension/SwiftFormat for Xcode.app/Contents/Frameworks/libswiftos.dylib and b/EditorExtension/SwiftFormat for Xcode.app/Contents/Frameworks/libswiftos.dylib differ diff --git a/EditorExtension/SwiftFormat for Xcode.app/Contents/Info.plist b/EditorExtension/SwiftFormat for Xcode.app/Contents/Info.plist index 376bb47a..a72e0c56 100644 --- a/EditorExtension/SwiftFormat for Xcode.app/Contents/Info.plist +++ b/EditorExtension/SwiftFormat for Xcode.app/Contents/Info.plist @@ -3,7 +3,7 @@ BuildMachineOSBuild - 20F71 + 20G165 CFBundleDevelopmentRegion en CFBundleDocumentTypes @@ -36,17 +36,17 @@ CFBundlePackageType APPL CFBundleShortVersionString - 0.48.11 + 0.48.12 CFBundleSupportedPlatforms MacOSX CFBundleVersion - 1 + 3 DTCompiler com.apple.compilers.llvm.clang.1_0 DTPlatformBuild - 12E507 + 13A233 DTPlatformName macosx DTPlatformVersion @@ -56,9 +56,9 @@ DTSDKName macosx11.3 DTXcode - 1251 + 1300 DTXcodeBuild - 12E507 + 13A233 LSApplicationCategoryType public.app-category.developer-tools LSMinimumSystemVersion 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 e0e4ef00..3a99787a 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/Frameworks/XcodeKit.framework/Versions/A/Resources/Info.plist b/EditorExtension/SwiftFormat for Xcode.app/Contents/PlugIns/SwiftFormat.appex/Contents/Frameworks/XcodeKit.framework/Versions/A/Resources/Info.plist index 4dc46f8d..18d659df 100644 Binary files a/EditorExtension/SwiftFormat for Xcode.app/Contents/PlugIns/SwiftFormat.appex/Contents/Frameworks/XcodeKit.framework/Versions/A/Resources/Info.plist and b/EditorExtension/SwiftFormat for Xcode.app/Contents/PlugIns/SwiftFormat.appex/Contents/Frameworks/XcodeKit.framework/Versions/A/Resources/Info.plist differ diff --git a/EditorExtension/SwiftFormat for Xcode.app/Contents/PlugIns/SwiftFormat.appex/Contents/Frameworks/XcodeKit.framework/Versions/A/Resources/version.plist b/EditorExtension/SwiftFormat for Xcode.app/Contents/PlugIns/SwiftFormat.appex/Contents/Frameworks/XcodeKit.framework/Versions/A/Resources/version.plist index 5d4fb7d2..97f7eca1 100644 --- a/EditorExtension/SwiftFormat for Xcode.app/Contents/PlugIns/SwiftFormat.appex/Contents/Frameworks/XcodeKit.framework/Versions/A/Resources/version.plist +++ b/EditorExtension/SwiftFormat for Xcode.app/Contents/PlugIns/SwiftFormat.appex/Contents/Frameworks/XcodeKit.framework/Versions/A/Resources/version.plist @@ -2,19 +2,17 @@ - BuildAliasOf - IDEFrameworks BuildVersion - 4 + 16 CFBundleShortVersionString - 12.5.1 + 13.0 CFBundleVersion - 18212 + 19234 ProductBuildVersion - 12E507 + 13A233 ProjectName IDEFrameworks SourceVersion - 18212000000000000 + 19234000000000000 diff --git a/EditorExtension/SwiftFormat for Xcode.app/Contents/PlugIns/SwiftFormat.appex/Contents/Frameworks/XcodeKit.framework/Versions/A/XcodeKit b/EditorExtension/SwiftFormat for Xcode.app/Contents/PlugIns/SwiftFormat.appex/Contents/Frameworks/XcodeKit.framework/Versions/A/XcodeKit index c78b1fbf..e7cb84ae 100755 Binary files a/EditorExtension/SwiftFormat for Xcode.app/Contents/PlugIns/SwiftFormat.appex/Contents/Frameworks/XcodeKit.framework/Versions/A/XcodeKit and b/EditorExtension/SwiftFormat for Xcode.app/Contents/PlugIns/SwiftFormat.appex/Contents/Frameworks/XcodeKit.framework/Versions/A/XcodeKit differ diff --git a/EditorExtension/SwiftFormat for Xcode.app/Contents/PlugIns/SwiftFormat.appex/Contents/Frameworks/XcodeKit.framework/Versions/A/_CodeSignature/CodeResources b/EditorExtension/SwiftFormat for Xcode.app/Contents/PlugIns/SwiftFormat.appex/Contents/Frameworks/XcodeKit.framework/Versions/A/_CodeSignature/CodeResources index b77bc727..d8308052 100644 --- a/EditorExtension/SwiftFormat for Xcode.app/Contents/PlugIns/SwiftFormat.appex/Contents/Frameworks/XcodeKit.framework/Versions/A/_CodeSignature/CodeResources +++ b/EditorExtension/SwiftFormat for Xcode.app/Contents/PlugIns/SwiftFormat.appex/Contents/Frameworks/XcodeKit.framework/Versions/A/_CodeSignature/CodeResources @@ -6,11 +6,11 @@ Resources/Info.plist - pn6y7jghO1WlUQniCZ8RF5QhF88= + ICA4oUFA/qPKkcAAeAwrU3NT25s= Resources/version.plist - Mf2ybpHuKm+dHh8S/DboldmJy3E= + SNVQwetdQroWcj635EpLe+BIXhI= files2 @@ -19,14 +19,14 @@ hash2 - v79nO8NDbYbLvZ2hiZPxHikv9Q26HusCPhrRlzOsoS8= + M/rwkjTGhjSS3C0RucV0Kjod9VjN5Xw5o7GxLrng59o= Resources/version.plist hash2 - DvwInq7XP8QHI5WEpqC3X0jjOnG/IY+SKyks3CIDoVg= + ojmtZ5rm6MK0vtPJElzdnvyVeHQnxFF84hQ4LK6sbI0= 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 e98dd047..4f617e70 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 @@ -3,7 +3,7 @@ BuildMachineOSBuild - 20F71 + 20G165 CFBundleDevelopmentRegion en CFBundleExecutable @@ -17,7 +17,7 @@ CFBundlePackageType XPC! CFBundleShortVersionString - 0.48.11 + 0.48.12 CFBundleSupportedPlatforms MacOSX @@ -27,7 +27,7 @@ DTCompiler com.apple.compilers.llvm.clang.1_0 DTPlatformBuild - 12E507 + 13A233 DTPlatformName macosx DTPlatformVersion @@ -37,9 +37,9 @@ DTSDKName macosx11.3 DTXcode - 1251 + 1300 DTXcodeBuild - 12E507 + 13A233 LSMinimumSystemVersion 10.14 NSExtension 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 a5c7aca8..b4a2f333 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/PlugIns/SwiftFormat.appex/Contents/_CodeSignature/CodeResources b/EditorExtension/SwiftFormat for Xcode.app/Contents/PlugIns/SwiftFormat.appex/Contents/_CodeSignature/CodeResources index 65df8c7e..9c9f6767 100644 --- a/EditorExtension/SwiftFormat for Xcode.app/Contents/PlugIns/SwiftFormat.appex/Contents/_CodeSignature/CodeResources +++ b/EditorExtension/SwiftFormat for Xcode.app/Contents/PlugIns/SwiftFormat.appex/Contents/_CodeSignature/CodeResources @@ -10,7 +10,7 @@ cdhash - wDuDBP45ityCn5C8VwLEPTvUYQE= + wBjGWBhV+PLoNkaGx6kFcFrDdRM= requirement anchor apple generic and identifier "com.apple.dt.XcodeKit" 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/EditorExtension/SwiftFormat for Xcode.app/Contents/Resources/Assets.car b/EditorExtension/SwiftFormat for Xcode.app/Contents/Resources/Assets.car index 823b6af8..cc818bad 100644 Binary files a/EditorExtension/SwiftFormat for Xcode.app/Contents/Resources/Assets.car and b/EditorExtension/SwiftFormat for Xcode.app/Contents/Resources/Assets.car differ diff --git a/EditorExtension/SwiftFormat for Xcode.app/Contents/Resources/Base.lproj/Main.storyboardc/9ZR-Qg-hHT-view-iDF-FY-6tf.nib b/EditorExtension/SwiftFormat for Xcode.app/Contents/Resources/Base.lproj/Main.storyboardc/9ZR-Qg-hHT-view-iDF-FY-6tf.nib index 2d6b7d6b..d9c4cf3b 100644 Binary files a/EditorExtension/SwiftFormat for Xcode.app/Contents/Resources/Base.lproj/Main.storyboardc/9ZR-Qg-hHT-view-iDF-FY-6tf.nib and b/EditorExtension/SwiftFormat for Xcode.app/Contents/Resources/Base.lproj/Main.storyboardc/9ZR-Qg-hHT-view-iDF-FY-6tf.nib differ diff --git a/EditorExtension/SwiftFormat for Xcode.app/Contents/Resources/Base.lproj/Main.storyboardc/Info.plist b/EditorExtension/SwiftFormat for Xcode.app/Contents/Resources/Base.lproj/Main.storyboardc/Info.plist index 7695ed44..ac9cfef1 100644 Binary files a/EditorExtension/SwiftFormat for Xcode.app/Contents/Resources/Base.lproj/Main.storyboardc/Info.plist and b/EditorExtension/SwiftFormat for Xcode.app/Contents/Resources/Base.lproj/Main.storyboardc/Info.plist differ diff --git a/EditorExtension/SwiftFormat for Xcode.app/Contents/Resources/Base.lproj/Main.storyboardc/MainMenu.nib b/EditorExtension/SwiftFormat for Xcode.app/Contents/Resources/Base.lproj/Main.storyboardc/MainMenu.nib index 5d2a5174..66798bf9 100644 Binary files a/EditorExtension/SwiftFormat for Xcode.app/Contents/Resources/Base.lproj/Main.storyboardc/MainMenu.nib and b/EditorExtension/SwiftFormat for Xcode.app/Contents/Resources/Base.lproj/Main.storyboardc/MainMenu.nib differ diff --git a/EditorExtension/SwiftFormat for Xcode.app/Contents/Resources/Base.lproj/Main.storyboardc/MainWindowTabViewController.nib b/EditorExtension/SwiftFormat for Xcode.app/Contents/Resources/Base.lproj/Main.storyboardc/MainWindowTabViewController.nib index 446929d2..a9309ba7 100644 Binary files a/EditorExtension/SwiftFormat for Xcode.app/Contents/Resources/Base.lproj/Main.storyboardc/MainWindowTabViewController.nib and b/EditorExtension/SwiftFormat for Xcode.app/Contents/Resources/Base.lproj/Main.storyboardc/MainWindowTabViewController.nib differ diff --git a/EditorExtension/SwiftFormat for Xcode.app/Contents/Resources/Base.lproj/Main.storyboardc/NSWindowController-B8D-0N-5wS.nib b/EditorExtension/SwiftFormat for Xcode.app/Contents/Resources/Base.lproj/Main.storyboardc/NSWindowController-B8D-0N-5wS.nib index be4cec0c..99936fc9 100644 Binary files a/EditorExtension/SwiftFormat for Xcode.app/Contents/Resources/Base.lproj/Main.storyboardc/NSWindowController-B8D-0N-5wS.nib and b/EditorExtension/SwiftFormat for Xcode.app/Contents/Resources/Base.lproj/Main.storyboardc/NSWindowController-B8D-0N-5wS.nib differ diff --git a/EditorExtension/SwiftFormat for Xcode.app/Contents/Resources/Base.lproj/Main.storyboardc/RulesViewController.nib b/EditorExtension/SwiftFormat for Xcode.app/Contents/Resources/Base.lproj/Main.storyboardc/RulesViewController.nib index 100e6e4c..79ccda43 100644 Binary files a/EditorExtension/SwiftFormat for Xcode.app/Contents/Resources/Base.lproj/Main.storyboardc/RulesViewController.nib and b/EditorExtension/SwiftFormat for Xcode.app/Contents/Resources/Base.lproj/Main.storyboardc/RulesViewController.nib differ diff --git a/EditorExtension/SwiftFormat for Xcode.app/Contents/Resources/Base.lproj/Main.storyboardc/XfG-lQ-9wD-view-m2S-Jp-Qdl.nib b/EditorExtension/SwiftFormat for Xcode.app/Contents/Resources/Base.lproj/Main.storyboardc/XfG-lQ-9wD-view-m2S-Jp-Qdl.nib index 2f50c69d..35ef9179 100644 Binary files a/EditorExtension/SwiftFormat for Xcode.app/Contents/Resources/Base.lproj/Main.storyboardc/XfG-lQ-9wD-view-m2S-Jp-Qdl.nib and b/EditorExtension/SwiftFormat for Xcode.app/Contents/Resources/Base.lproj/Main.storyboardc/XfG-lQ-9wD-view-m2S-Jp-Qdl.nib differ diff --git a/EditorExtension/SwiftFormat for Xcode.app/Contents/_CodeSignature/CodeResources b/EditorExtension/SwiftFormat for Xcode.app/Contents/_CodeSignature/CodeResources index eb46f675..e92ba143 100644 --- a/EditorExtension/SwiftFormat for Xcode.app/Contents/_CodeSignature/CodeResources +++ b/EditorExtension/SwiftFormat for Xcode.app/Contents/_CodeSignature/CodeResources @@ -10,35 +10,35 @@ Resources/Assets.car - js+PUP9vzfdK5eMYGBWPQdECXvY= + XHuEx82WXHmB7UnEed/RcIwPCPg= Resources/Base.lproj/Main.storyboardc/9ZR-Qg-hHT-view-iDF-FY-6tf.nib - w1OUVRvAvds0uXulB+16dDTHRcs= + mrZLNmq/O4+JbR1yQnG4qdGx0Kc= Resources/Base.lproj/Main.storyboardc/Info.plist - Ug1mpfebeNBNbTFRiwfOy/FOPcQ= + ghcvgtY8vvtfc8rFzWjzgo/YEMw= Resources/Base.lproj/Main.storyboardc/MainMenu.nib - U/Ext2c7grLwS1dx47fW3VrwIeY= + JOjICdvnnw/5xq+ZiRpKQ9O3mV0= Resources/Base.lproj/Main.storyboardc/MainWindowTabViewController.nib - kXW5sYF8WyQJe37p1ozsAe2Vyxc= + 50SO3mHlM8JMA6qc5BUN4kg78to= Resources/Base.lproj/Main.storyboardc/NSWindowController-B8D-0N-5wS.nib - Kvra35Ha7AbCztomOuZ0/FMsYh0= + GqRr9h6nun1kbW1zjl2sh64V3pA= Resources/Base.lproj/Main.storyboardc/RulesViewController.nib - 2FZ/qCZTu+bM4MSZx4fKhmF3X4M= + boUQDKAE2DPPv7FOFg3C86Fqhu0= Resources/Base.lproj/Main.storyboardc/XfG-lQ-9wD-view-m2S-Jp-Qdl.nib - 4MoP7m4Bw4bzp2OXeY0lzO/hxH0= + PQGq3mXizlLyJhGRRAtppuoATno= files2 @@ -209,7 +209,7 @@ cdhash - WT9BZhoeJIAh/AMaltaDe8Ym1Cw= + KQWFcdXHScSx65ZFeTeklztWORE= 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") @@ -225,56 +225,56 @@ hash2 - wabgzocgFufjTt9GrtfXKizYclrkW8qUQ6WeOD1LKVU= + EQV+aLNKjodRHPUqeSV11LLzSThWp2tPlbP1mHyApfI= Resources/Base.lproj/Main.storyboardc/9ZR-Qg-hHT-view-iDF-FY-6tf.nib hash2 - 2CneYKKjcz0jRTelQBPO/nTiIpiWqJovIpibuVlJ0xE= + lZdeDSnV8TXgU5NgRAWXaHO9sxpQVYBNzYNUde3FZfU= Resources/Base.lproj/Main.storyboardc/Info.plist hash2 - hnG5wbArf/GdN3XBl53R5wEP94EVJPZRKdRaHEG6S5w= + 2zyR6kGF7gqh3dWOgGMO0bqu6nt98I8YVgY4mW60A2Y= Resources/Base.lproj/Main.storyboardc/MainMenu.nib hash2 - o5b8hrBQSuYeXdBmU31Dmx0IygtDHnsLIoj2eYYUwuc= + hwdATReDopoie9jgnE0qTMsyjuBBLXDh7PV2UTgMlgE= Resources/Base.lproj/Main.storyboardc/MainWindowTabViewController.nib hash2 - DEiOajcSFY2XMPZ3y7wkZrJ+Gy5B/5N3WpF7jxFTJP8= + CxrPF1F734Ma8gznl27AnpkKpiutlVqyK4quvE+6TKs= Resources/Base.lproj/Main.storyboardc/NSWindowController-B8D-0N-5wS.nib hash2 - thffAq++mbcVKwz/cBrEQRgSlw9AI8s8Co8xPEgpLfM= + wFXPjhkbYWzukVXvyiwhB7SZvaKDw+hczG8aVWpTfE0= Resources/Base.lproj/Main.storyboardc/RulesViewController.nib hash2 - LcUcZNtlneViFehLeaYLCZQjY0QIf5mlrCoYtsvg7iw= + 0uWOCcEDuTxEW8r2GgHS08G/uuaIpg5akS5MNHIzidw= Resources/Base.lproj/Main.storyboardc/XfG-lQ-9wD-view-m2S-Jp-Qdl.nib hash2 - LB8M9QMQxHDiH9SQVbT5klyq7udCat14Fg1bRyBCwMc= + bfJzPXguuGZKzwTnsZ8Ex/ul+B8GbLmg8Ok17E3CMEc= diff --git a/Sources/Formatter.swift b/Sources/Formatter.swift index 720f810a..4cfdbe18 100644 --- a/Sources/Formatter.swift +++ b/Sources/Formatter.swift @@ -2,7 +2,7 @@ // Formatter.swift // SwiftFormat // -// Version 0.48.11 +// Version 0.48.12 // // Created by Nick Lockwood on 12/08/2016. // Copyright 2016 Nick Lockwood diff --git a/Sources/FormattingHelpers.swift b/Sources/FormattingHelpers.swift index e20106b4..cf7c9745 100644 --- a/Sources/FormattingHelpers.swift +++ b/Sources/FormattingHelpers.swift @@ -31,7 +31,7 @@ extension Formatter { var declarationIndex: Int? = -1 var scopeIndexStack = [Int]() var locals = Set() - while let token = self.token(at: index) { + while let token = token(at: index) { outer: switch token { case .identifier where last(.nonSpaceOrCommentOrLinebreak, before: index)?.isOperator == false: switch next(.nonSpaceOrCommentOrLinebreak, after: index) { @@ -294,7 +294,7 @@ extension Formatter { ) } func wrapArgumentsAfterFirst(startOfScope i: Int, endOfScope: Int, allowGrouping: Bool) { - guard var firstArgumentIndex = self.index(of: .nonSpaceOrLinebreak, in: i + 1 ..< endOfScope) else { + guard var firstArgumentIndex = index(of: .nonSpaceOrLinebreak, in: i + 1 ..< endOfScope) else { return } @@ -567,7 +567,7 @@ extension Formatter { func removeParen(at index: Int) { func tokenOutsideParenRequiresSpacing(at index: Int) -> Bool { - guard let token = self.token(at: index) else { return false } + guard let token = token(at: index) else { return false } switch token { case .identifier, .keyword, .number, .startOfScope("#if"): return true @@ -577,7 +577,7 @@ extension Formatter { } func tokenInsideParenRequiresSpacing(at index: Int) -> Bool { - guard let token = self.token(at: index) else { return false } + guard let token = token(at: index) else { return false } switch token { case .operator, .startOfScope("{"), .endOfScope("}"): return true diff --git a/Sources/Inference.swift b/Sources/Inference.swift index feb630a8..074630b1 100644 --- a/Sources/Inference.swift +++ b/Sources/Inference.swift @@ -218,7 +218,7 @@ private struct Inference { let trailingCommas = OptionInferrer { formatter, options in var trailing = 0, noTrailing = 0 - formatter.forEach(.endOfScope("]")) { i, token in + formatter.forEach(.endOfScope("]")) { i, _ in guard let linebreakIndex = formatter.index(of: .nonSpaceOrComment, before: i), case .linebreak = formatter.tokens[linebreakIndex], let prevTokenIndex = formatter.index(of: .nonSpaceOrCommentOrLinebreak, before: linebreakIndex + 1), diff --git a/Sources/ParsingHelpers.swift b/Sources/ParsingHelpers.swift index 600d71a9..3d8ed40f 100644 --- a/Sources/ParsingHelpers.swift +++ b/Sources/ParsingHelpers.swift @@ -237,7 +237,7 @@ enum ScopeType { extension Formatter { func scopeType(at index: Int) -> ScopeType? { - guard let token = self.token(at: index) else { + guard let token = token(at: index) else { return nil } guard case .startOfScope = token else { @@ -531,7 +531,7 @@ extension Formatter { func isInClosureArguments(at i: Int) -> Bool { var i = i - while let token = self.token(at: i) { + while let token = token(at: i) { switch token { case .keyword("in"), .keyword("throws"), .keyword("rethrows"), .keyword("async"): guard let scopeIndex = index(of: .startOfScope, before: i, if: { @@ -716,7 +716,7 @@ extension Formatter { // Determine if next line after this token should be indented func isEndOfStatement(at i: Int, in scope: Token? = nil) -> Bool { - guard let token = self.token(at: i) else { return true } + guard let token = token(at: i) else { return true } switch token { case .endOfScope("case"), .endOfScope("default"): return false @@ -778,7 +778,7 @@ extension Formatter { // Determine if line starting with this token should be indented func isStartOfStatement(at i: Int, in scope: Token? = nil) -> Bool { - guard let token = self.token(at: i) else { return true } + guard let token = token(at: i) else { return true } switch token { case let .keyword(string) where [ // TODO: handle "in" "where", "dynamicType", "rethrows", "throws", "async", @@ -1231,7 +1231,7 @@ extension Formatter { // get type of declaration starting at index of declaration keyword func declarationType(at index: Int) -> String? { - guard let token = self.token(at: index), token.isDeclarationTypeKeyword, + guard let token = token(at: index), token.isDeclarationTypeKeyword, case let .keyword(keyword) = token else { return nil diff --git a/Sources/SwiftFormat.swift b/Sources/SwiftFormat.swift index 725c82ee..54a8b6f4 100644 --- a/Sources/SwiftFormat.swift +++ b/Sources/SwiftFormat.swift @@ -32,7 +32,7 @@ import Foundation /// The current SwiftFormat version -let swiftFormatVersion = "0.48.11" +let swiftFormatVersion = "0.48.12" public let version = swiftFormatVersion /// The standard SwiftFormat config file name diff --git a/Sources/Tokenizer.swift b/Sources/Tokenizer.swift index 62979ece..5f565122 100644 --- a/Sources/Tokenizer.swift +++ b/Sources/Tokenizer.swift @@ -2,7 +2,7 @@ // Tokenizer.swift // SwiftFormat // -// Version 0.48.11 +// Version 0.48.12 // // Created by Nick Lockwood on 11/08/2016. // Copyright 2016 Nick Lockwood diff --git a/SwiftFormat.podspec.json b/SwiftFormat.podspec.json index b1d64989..269bc106 100644 --- a/SwiftFormat.podspec.json +++ b/SwiftFormat.podspec.json @@ -1,6 +1,6 @@ { "name": "SwiftFormat", - "version": "0.48.11", + "version": "0.48.12", "license": { "type": "MIT", "file": "LICENSE.md" @@ -10,7 +10,7 @@ "authors": "Nick Lockwood", "source": { "git": "https://github.com/nicklockwood/SwiftFormat.git", - "tag": "0.48.11" + "tag": "0.48.12" }, "default_subspecs": "Core", "subspecs": [ diff --git a/SwiftFormat.xcodeproj/project.pbxproj b/SwiftFormat.xcodeproj/project.pbxproj index 328870d0..1e7b582f 100644 --- a/SwiftFormat.xcodeproj/project.pbxproj +++ b/SwiftFormat.xcodeproj/project.pbxproj @@ -1080,7 +1080,7 @@ "@executable_path/../Frameworks", "@loader_path/Frameworks", ); - MARKETING_VERSION = 0.48.11; + MARKETING_VERSION = 0.48.12; 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.48.11; + MARKETING_VERSION = 0.48.12; 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.48.11; + MARKETING_VERSION = 0.48.12; 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.48.11; + MARKETING_VERSION = 0.48.12; 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.48.11; + MARKETING_VERSION = 0.48.12; 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.48.11; + MARKETING_VERSION = 0.48.12; PRODUCT_BUNDLE_IDENTIFIER = "com.charcoaldesign.SwiftFormat-for-Xcode.SourceEditorExtension"; PRODUCT_NAME = SwiftFormat; PROVISIONING_PROFILE_SPECIFIER = ""; diff --git a/Tests/Info.plist b/Tests/Info.plist index c1b52034..6720dbcf 100644 --- a/Tests/Info.plist +++ b/Tests/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType BNDL CFBundleShortVersionString - 0.48.11 + 0.48.12 CFBundleSignature ???? CFBundleVersion