From 90be48ebb7be3c40033c3491e0def596a0f97628 Mon Sep 17 00:00:00 2001 From: Norio Nomura Date: Sun, 21 Feb 2016 19:15:09 +0900 Subject: [PATCH 01/14] Update SourceKitten to 0.11.0 --- Cartfile | 2 +- Cartfile.resolved | 2 +- Carthage/Checkouts/SourceKitten | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cartfile b/Cartfile index 618ff1f3e..7ec570411 100644 --- a/Cartfile +++ b/Cartfile @@ -1,2 +1,2 @@ -github "jpsim/SourceKitten" +github "jpsim/SourceKitten" "0.11.0" github "scottrhoyt/SwiftyTextTable" "0.2.1" diff --git a/Cartfile.resolved b/Cartfile.resolved index d995e8a6c..bd3e3c2dc 100644 --- a/Cartfile.resolved +++ b/Cartfile.resolved @@ -4,4 +4,4 @@ github "scottrhoyt/SwiftyTextTable" "0.2.1" github "behrang/YamlSwift" "1.4.2" github "jspahrsummers/xcconfigs" "0.9" github "Carthage/Commandant" "0.8.3" -github "jpsim/SourceKitten" "0.10.0" +github "jpsim/SourceKitten" "0.11.0" diff --git a/Carthage/Checkouts/SourceKitten b/Carthage/Checkouts/SourceKitten index 5b86c515e..6415bc91f 160000 --- a/Carthage/Checkouts/SourceKitten +++ b/Carthage/Checkouts/SourceKitten @@ -1 +1 @@ -Subproject commit 5b86c515ef22bc81918dd94186f5fe53399ef9b8 +Subproject commit 6415bc91fde389c9b4866e2b61e1189be4c9796c From c1ee9f4939da93a730ee7d92276f10cbd4876223 Mon Sep 17 00:00:00 2001 From: Norio Nomura Date: Sun, 21 Feb 2016 19:19:42 +0900 Subject: [PATCH 02/14] Remove linking `libclang.dylib` and `sourcekitd.framework` --- SwiftLint.xcodeproj/project.pbxproj | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/SwiftLint.xcodeproj/project.pbxproj b/SwiftLint.xcodeproj/project.pbxproj index b68d08c27..73327cc5c 100644 --- a/SwiftLint.xcodeproj/project.pbxproj +++ b/SwiftLint.xcodeproj/project.pbxproj @@ -73,7 +73,6 @@ E86396C71BADAFE6002C9E88 /* ReporterTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = E86396C61BADAFE6002C9E88 /* ReporterTests.swift */; }; E86396C91BADB2B9002C9E88 /* JSONReporter.swift in Sources */ = {isa = PBXBuildFile; fileRef = E86396C81BADB2B9002C9E88 /* JSONReporter.swift */; }; E86396CB1BADB519002C9E88 /* CSVReporter.swift in Sources */ = {isa = PBXBuildFile; fileRef = E86396CA1BADB519002C9E88 /* CSVReporter.swift */; }; - E868473C1A587C6E0043DC65 /* sourcekitd.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E868473B1A587C6E0043DC65 /* sourcekitd.framework */; }; E876BFBE1B07828500114ED5 /* SourceKittenFramework.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E876BFBD1B07828500114ED5 /* SourceKittenFramework.framework */; }; E876BFBF1B0782AA00114ED5 /* SourceKittenFramework.framework in Copy Frameworks */ = {isa = PBXBuildFile; fileRef = E876BFBD1B07828500114ED5 /* SourceKittenFramework.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; E87E4A051BFB927C00FCFE46 /* TrailingSemicolonRule.swift in Sources */ = {isa = PBXBuildFile; fileRef = E87E4A041BFB927C00FCFE46 /* TrailingSemicolonRule.swift */; }; @@ -106,7 +105,6 @@ E88DEA8C1B0999A000A66CB0 /* ASTRule.swift in Sources */ = {isa = PBXBuildFile; fileRef = E88DEA8B1B0999A000A66CB0 /* ASTRule.swift */; }; E89376AD1B8A701E0025708E /* Yaml.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E89376AC1B8A701E0025708E /* Yaml.framework */; }; E89376AE1B8A70400025708E /* Yaml.framework in Copy Frameworks */ = {isa = PBXBuildFile; fileRef = E89376AC1B8A701E0025708E /* Yaml.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; - E8AB1A2E1A649F2100452012 /* libclang.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = E8AB1A2D1A649F2100452012 /* libclang.dylib */; }; E8B067811C13E49600E9E13F /* Configuration+CommandLine.swift in Sources */ = {isa = PBXBuildFile; fileRef = E8B067801C13E49600E9E13F /* Configuration+CommandLine.swift */; }; E8B67C3E1C095E6300FDED8E /* Correction.swift in Sources */ = {isa = PBXBuildFile; fileRef = E8B67C3D1C095E6300FDED8E /* Correction.swift */; }; E8BA7E111B07A3EC003E02D0 /* Commandant.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E8BA7E101B07A3EC003E02D0 /* Commandant.framework */; }; @@ -303,8 +301,6 @@ E8BA7E131B07A3F3003E02D0 /* Result.framework in Frameworks */, E8BA7E111B07A3EC003E02D0 /* Commandant.framework in Frameworks */, E876BFBE1B07828500114ED5 /* SourceKittenFramework.framework in Frameworks */, - E8AB1A2E1A649F2100452012 /* libclang.dylib in Frameworks */, - E868473C1A587C6E0043DC65 /* sourcekitd.framework in Frameworks */, E8C0DFCD1AD349DB007EE3D4 /* SWXMLHash.framework in Frameworks */, 3BBF2F9D1C640A0F006CD775 /* SwiftyTextTable.framework in Frameworks */, ); @@ -985,7 +981,7 @@ ); FRAMEWORK_VERSION = A; INFOPLIST_FILE = "Source/SwiftLintFramework/Supporting Files/Info.plist"; - LD_RUNPATH_SEARCH_PATHS = "@loader_path/Frameworks $(DEVELOPER_DIR)/Toolchains/XcodeDefault.xctoolchain/usr/lib /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib"; + LD_RUNPATH_SEARCH_PATHS = "@loader_path/Frameworks"; LIBRARY_SEARCH_PATHS = ( "$(inherited)", "$(DEVELOPER_DIR)/Toolchains/XcodeDefault.xctoolchain/usr/lib", @@ -1017,7 +1013,7 @@ ); FRAMEWORK_VERSION = A; INFOPLIST_FILE = "Source/SwiftLintFramework/Supporting Files/Info.plist"; - LD_RUNPATH_SEARCH_PATHS = "@loader_path/Frameworks $(DEVELOPER_DIR)/Toolchains/XcodeDefault.xctoolchain/usr/lib /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib"; + LD_RUNPATH_SEARCH_PATHS = "@loader_path/Frameworks"; LIBRARY_SEARCH_PATHS = ( "$(inherited)", "$(DEVELOPER_DIR)/Toolchains/XcodeDefault.xctoolchain/usr/lib", @@ -1089,7 +1085,7 @@ ); FRAMEWORK_VERSION = A; INFOPLIST_FILE = "Source/SwiftLintFramework/Supporting Files/Info.plist"; - LD_RUNPATH_SEARCH_PATHS = "@loader_path/Frameworks $(DEVELOPER_DIR)/Toolchains/XcodeDefault.xctoolchain/usr/lib /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib"; + LD_RUNPATH_SEARCH_PATHS = "@loader_path/Frameworks"; LIBRARY_SEARCH_PATHS = ( "$(inherited)", "$(DEVELOPER_DIR)/Toolchains/XcodeDefault.xctoolchain/usr/lib", @@ -1146,7 +1142,7 @@ ); FRAMEWORK_VERSION = A; INFOPLIST_FILE = "Source/SwiftLintFramework/Supporting Files/Info.plist"; - LD_RUNPATH_SEARCH_PATHS = "@loader_path/Frameworks $(DEVELOPER_DIR)/Toolchains/XcodeDefault.xctoolchain/usr/lib /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib"; + LD_RUNPATH_SEARCH_PATHS = "@loader_path/Frameworks"; LIBRARY_SEARCH_PATHS = ( "$(inherited)", "$(DEVELOPER_DIR)/Toolchains/XcodeDefault.xctoolchain/usr/lib", From cf15800474cfa45d57f01041678ae8a55d5ae4ad Mon Sep 17 00:00:00 2001 From: Norio Nomura Date: Sun, 21 Feb 2016 20:23:44 +0900 Subject: [PATCH 03/14] [SPM] Remove `spm_bootstrap` and `spm_teardown` from `Makefile` --- .travis.yml | 1 - Makefile | 6 ------ 2 files changed, 7 deletions(-) diff --git a/.travis.yml b/.travis.yml index ac4893aec..401329a20 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,7 +14,6 @@ matrix: env: JOB=SPM before_install: - make swift_snapshot_install - - make spm_bootstrap exclude: - script: placeholder # workaround for https://github.com/travis-ci/travis-ci/issues/4681 diff --git a/Makefile b/Makefile index 9358b0405..4e6fdad82 100644 --- a/Makefile +++ b/Makefile @@ -81,12 +81,6 @@ swift_snapshot_install: curl https://swift.org/builds/development/xcode/$(SWIFT_SNAPSHOT)/$(SWIFT_SNAPSHOT)-osx.pkg -o swift.pkg sudo installer -pkg swift.pkg -target / -spm_bootstrap: spm_teardown - curl https://raw.githubusercontent.com/jpsim/SourceKitten/master/script/spm_bootstrap | bash -s $(SWIFT_SNAPSHOT) - -spm_teardown: - curl https://raw.githubusercontent.com/jpsim/SourceKitten/master/script/spm_teardown | bash - spm: $(SWIFT_BUILD_COMMAND) From ee44cedadf9337c8fba86833bc59f7c220c44281 Mon Sep 17 00:00:00 2001 From: Norio Nomura Date: Sun, 21 Feb 2016 20:24:17 +0900 Subject: [PATCH 04/14] [SPM] Update to swift-DEVELOPMENT-SNAPSHOT-2016-03-01-a --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 4e6fdad82..43b2268d9 100644 --- a/Makefile +++ b/Makefile @@ -16,7 +16,7 @@ OUTPUT_PACKAGE=SwiftLint.pkg VERSION_STRING=$(shell agvtool what-marketing-version -terse1) COMPONENTS_PLIST=Source/swiftlint/Supporting Files/Components.plist -SWIFT_SNAPSHOT=swift-DEVELOPMENT-SNAPSHOT-2016-02-03-a +SWIFT_SNAPSHOT=swift-DEVELOPMENT-SNAPSHOT-2016-03-01-a SWIFT_BUILD_COMMAND=/Library/Developer/Toolchains/$(SWIFT_SNAPSHOT).xctoolchain/usr/bin/swift build .PHONY: all bootstrap clean install package test uninstall From 6dbef0b055e9e6357296f7659ff8e248adc98f6e Mon Sep 17 00:00:00 2001 From: Norio Nomura Date: Sun, 21 Feb 2016 22:32:33 +0900 Subject: [PATCH 05/14] Cleanup `FRAMEWORK_SEARCH_PATHS` and `LIBRARY_SEARCH_PATHS` --- SwiftLint.xcodeproj/project.pbxproj | 52 ----------------------------- 1 file changed, 52 deletions(-) diff --git a/SwiftLint.xcodeproj/project.pbxproj b/SwiftLint.xcodeproj/project.pbxproj index 73327cc5c..6dc89149b 100644 --- a/SwiftLint.xcodeproj/project.pbxproj +++ b/SwiftLint.xcodeproj/project.pbxproj @@ -975,17 +975,9 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; EMBEDDED_CONTENT_CONTAINS_SWIFT = YES; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(DEVELOPER_DIR)/Toolchains/XcodeDefault.xctoolchain/usr/lib", - ); FRAMEWORK_VERSION = A; INFOPLIST_FILE = "Source/SwiftLintFramework/Supporting Files/Info.plist"; LD_RUNPATH_SEARCH_PATHS = "@loader_path/Frameworks"; - LIBRARY_SEARCH_PATHS = ( - "$(inherited)", - "$(DEVELOPER_DIR)/Toolchains/XcodeDefault.xctoolchain/usr/lib", - ); PRODUCT_BUNDLE_IDENTIFIER = "io.realm.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = SwiftLintFramework; VERSIONING_SYSTEM = "apple-generic"; @@ -1007,17 +999,9 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; EMBEDDED_CONTENT_CONTAINS_SWIFT = YES; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(DEVELOPER_DIR)/Toolchains/XcodeDefault.xctoolchain/usr/lib", - ); FRAMEWORK_VERSION = A; INFOPLIST_FILE = "Source/SwiftLintFramework/Supporting Files/Info.plist"; LD_RUNPATH_SEARCH_PATHS = "@loader_path/Frameworks"; - LIBRARY_SEARCH_PATHS = ( - "$(inherited)", - "$(DEVELOPER_DIR)/Toolchains/XcodeDefault.xctoolchain/usr/lib", - ); PRODUCT_BUNDLE_IDENTIFIER = "io.realm.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = SwiftLintFramework; VERSIONING_SYSTEM = "apple-generic"; @@ -1034,10 +1018,6 @@ isa = XCBuildConfiguration; baseConfigurationReference = D0D1213419E878CC005E4BAA /* Mac-Application.xcconfig */; buildSettings = { - FRAMEWORK_SEARCH_PATHS = ( - "$(DEVELOPER_FRAMEWORKS_DIR)", - "$(inherited)", - ); INFOPLIST_FILE = "Source/SwiftLintFrameworkTests/Supporting Files/Info.plist"; OTHER_SWIFT_FLAGS = "-D SWIFTLINT_XCODE_VERSION_$(XCODE_VERSION_MINOR)"; PRODUCT_BUNDLE_IDENTIFIER = "io.realm.$(PRODUCT_NAME:rfc1034identifier)"; @@ -1049,10 +1029,6 @@ isa = XCBuildConfiguration; baseConfigurationReference = D0D1213419E878CC005E4BAA /* Mac-Application.xcconfig */; buildSettings = { - FRAMEWORK_SEARCH_PATHS = ( - "$(DEVELOPER_FRAMEWORKS_DIR)", - "$(inherited)", - ); INFOPLIST_FILE = "Source/SwiftLintFrameworkTests/Supporting Files/Info.plist"; OTHER_SWIFT_FLAGS = "-D SWIFTLINT_XCODE_VERSION_$(XCODE_VERSION_MINOR)"; PRODUCT_BUNDLE_IDENTIFIER = "io.realm.$(PRODUCT_NAME:rfc1034identifier)"; @@ -1079,17 +1055,9 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; EMBEDDED_CONTENT_CONTAINS_SWIFT = YES; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(DEVELOPER_DIR)/Toolchains/XcodeDefault.xctoolchain/usr/lib", - ); FRAMEWORK_VERSION = A; INFOPLIST_FILE = "Source/SwiftLintFramework/Supporting Files/Info.plist"; LD_RUNPATH_SEARCH_PATHS = "@loader_path/Frameworks"; - LIBRARY_SEARCH_PATHS = ( - "$(inherited)", - "$(DEVELOPER_DIR)/Toolchains/XcodeDefault.xctoolchain/usr/lib", - ); PRODUCT_BUNDLE_IDENTIFIER = "io.realm.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = SwiftLintFramework; VERSIONING_SYSTEM = "apple-generic"; @@ -1106,10 +1074,6 @@ isa = XCBuildConfiguration; baseConfigurationReference = D0D1213419E878CC005E4BAA /* Mac-Application.xcconfig */; buildSettings = { - FRAMEWORK_SEARCH_PATHS = ( - "$(DEVELOPER_FRAMEWORKS_DIR)", - "$(inherited)", - ); INFOPLIST_FILE = "Source/SwiftLintFrameworkTests/Supporting Files/Info.plist"; OTHER_SWIFT_FLAGS = "-D SWIFTLINT_XCODE_VERSION_$(XCODE_VERSION_MINOR)"; PRODUCT_BUNDLE_IDENTIFIER = "io.realm.$(PRODUCT_NAME:rfc1034identifier)"; @@ -1136,17 +1100,9 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; EMBEDDED_CONTENT_CONTAINS_SWIFT = YES; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(DEVELOPER_DIR)/Toolchains/XcodeDefault.xctoolchain/usr/lib", - ); FRAMEWORK_VERSION = A; INFOPLIST_FILE = "Source/SwiftLintFramework/Supporting Files/Info.plist"; LD_RUNPATH_SEARCH_PATHS = "@loader_path/Frameworks"; - LIBRARY_SEARCH_PATHS = ( - "$(inherited)", - "$(DEVELOPER_DIR)/Toolchains/XcodeDefault.xctoolchain/usr/lib", - ); PRODUCT_BUNDLE_IDENTIFIER = "io.realm.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = SwiftLintFramework; VERSIONING_SYSTEM = "apple-generic"; @@ -1163,10 +1119,6 @@ isa = XCBuildConfiguration; baseConfigurationReference = D0D1213419E878CC005E4BAA /* Mac-Application.xcconfig */; buildSettings = { - FRAMEWORK_SEARCH_PATHS = ( - "$(DEVELOPER_FRAMEWORKS_DIR)", - "$(inherited)", - ); INFOPLIST_FILE = "Source/SwiftLintFrameworkTests/Supporting Files/Info.plist"; OTHER_SWIFT_FLAGS = "-D SWIFTLINT_XCODE_VERSION_$(XCODE_VERSION_MINOR)"; PRODUCT_BUNDLE_IDENTIFIER = "io.realm.$(PRODUCT_NAME:rfc1034identifier)"; @@ -1178,7 +1130,6 @@ isa = XCBuildConfiguration; baseConfigurationReference = D0D1213419E878CC005E4BAA /* Mac-Application.xcconfig */; buildSettings = { - FRAMEWORK_SEARCH_PATHS = "$(inherited)"; INFOPLIST_FILE = "Source/swiftlint/Supporting Files/Info.plist"; LD_RUNPATH_SEARCH_PATHS = "@executable_path/../Frameworks/SwiftLintFramework.framework/Versions/Current/Frameworks /Library/Frameworks/SwiftLintFramework.framework/Versions/Current/Frameworks /Library/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "io.realm.$(PRODUCT_NAME:rfc1034identifier)"; @@ -1190,7 +1141,6 @@ isa = XCBuildConfiguration; baseConfigurationReference = D0D1213419E878CC005E4BAA /* Mac-Application.xcconfig */; buildSettings = { - FRAMEWORK_SEARCH_PATHS = "$(inherited)"; INFOPLIST_FILE = "Source/swiftlint/Supporting Files/Info.plist"; LD_RUNPATH_SEARCH_PATHS = "@executable_path/../Frameworks/SwiftLintFramework.framework/Versions/Current/Frameworks /Library/Frameworks/SwiftLintFramework.framework/Versions/Current/Frameworks /Library/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "io.realm.$(PRODUCT_NAME:rfc1034identifier)"; @@ -1202,7 +1152,6 @@ isa = XCBuildConfiguration; baseConfigurationReference = D0D1213419E878CC005E4BAA /* Mac-Application.xcconfig */; buildSettings = { - FRAMEWORK_SEARCH_PATHS = "$(inherited)"; INFOPLIST_FILE = "Source/swiftlint/Supporting Files/Info.plist"; LD_RUNPATH_SEARCH_PATHS = "@executable_path/../Frameworks/SwiftLintFramework.framework/Versions/Current/Frameworks /Library/Frameworks/SwiftLintFramework.framework/Versions/Current/Frameworks /Library/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "io.realm.$(PRODUCT_NAME:rfc1034identifier)"; @@ -1214,7 +1163,6 @@ isa = XCBuildConfiguration; baseConfigurationReference = D0D1213419E878CC005E4BAA /* Mac-Application.xcconfig */; buildSettings = { - FRAMEWORK_SEARCH_PATHS = "$(inherited)"; INFOPLIST_FILE = "Source/swiftlint/Supporting Files/Info.plist"; LD_RUNPATH_SEARCH_PATHS = "@executable_path/../Frameworks/SwiftLintFramework.framework/Versions/Current/Frameworks /Library/Frameworks/SwiftLintFramework.framework/Versions/Current/Frameworks /Library/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "io.realm.$(PRODUCT_NAME:rfc1034identifier)"; From fa78d39ff8df997d9531a282d862bd739c1f3678 Mon Sep 17 00:00:00 2001 From: Norio Nomura Date: Sun, 21 Feb 2016 22:54:33 +0900 Subject: [PATCH 06/14] [SPM] Update SourceKitten to 0.11.0 --- Package.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Package.swift b/Package.swift index 11d3eb899..7f2cb6134 100644 --- a/Package.swift +++ b/Package.swift @@ -14,7 +14,7 @@ let package = Package( ]), ], dependencies: [ - .Package(url: "https://github.com/jpsim/SourceKitten.git", majorVersion: 0, minor: 10), + .Package(url: "https://github.com/jpsim/SourceKitten.git", majorVersion: 0, minor: 11), .Package(url: "https://github.com/behrang/YamlSwift.git", majorVersion: 1), .Package(url: "https://github.com/norio-nomura/swift-corelibs-xctest.git", majorVersion: 0), .Package(url: "https://github.com/scottrhoyt/SwiftyTextTable.git", majorVersion: 0, minor: 2), From 5caeb0734231d177ff2d6f970d03fa3eee23c404 Mon Sep 17 00:00:00 2001 From: Norio Nomura Date: Fri, 18 Mar 2016 00:09:32 +0900 Subject: [PATCH 07/14] [SPM] Move `Source/SwiftLintFrameworkTests` to `Tests/SwiftLintFramework` --- Source/SwiftLintFrameworkTests/main.swift | 23 ------------------- SwiftLint.xcodeproj/project.pbxproj | 12 ++++------ .../ConfigurationTests.swift | 0 .../CustomRulesTests.swift | 0 .../ExtendedNSStringTests.swift | 0 .../FunctionBodyLengthRuleTests.swift | 0 .../IntegrationTests.swift | 0 .../SwiftLintFramework}/ReporterTests.swift | 0 .../Resources/ProjectMock/.swiftlint.yml | 0 .../Resources/ProjectMock/Level0.swift | 0 .../Resources/ProjectMock/Level1/Level1.swift | 0 .../ProjectMock/Level1/Level2/.swiftlint.yml | 0 .../ProjectMock/Level1/Level2/Level2.swift | 0 .../Level1/Level2/Level3/Level3.swift | 0 .../SwiftLintFramework}/Resources/test.yml | 0 .../RuleConfigurationTests.swift | 0 .../SwiftLintFramework}/RuleTests.swift | 0 .../SwiftLintFramework}/RulesTests.swift | 0 .../Supporting Files/Info.plist | 0 .../SwiftLintFramework}/TestHelpers.swift | 0 .../Yaml+SwiftLintTests.swift | 0 .../SwiftLintFramework}/YamlParserTests.swift | 0 22 files changed, 5 insertions(+), 30 deletions(-) delete mode 100644 Source/SwiftLintFrameworkTests/main.swift rename {Source/SwiftLintFrameworkTests => Tests/SwiftLintFramework}/ConfigurationTests.swift (100%) rename {Source/SwiftLintFrameworkTests => Tests/SwiftLintFramework}/CustomRulesTests.swift (100%) rename {Source/SwiftLintFrameworkTests => Tests/SwiftLintFramework}/ExtendedNSStringTests.swift (100%) rename {Source/SwiftLintFrameworkTests => Tests/SwiftLintFramework}/FunctionBodyLengthRuleTests.swift (100%) rename {Source/SwiftLintFrameworkTests => Tests/SwiftLintFramework}/IntegrationTests.swift (100%) rename {Source/SwiftLintFrameworkTests => Tests/SwiftLintFramework}/ReporterTests.swift (100%) rename {Source/SwiftLintFrameworkTests => Tests/SwiftLintFramework}/Resources/ProjectMock/.swiftlint.yml (100%) rename {Source/SwiftLintFrameworkTests => Tests/SwiftLintFramework}/Resources/ProjectMock/Level0.swift (100%) rename {Source/SwiftLintFrameworkTests => Tests/SwiftLintFramework}/Resources/ProjectMock/Level1/Level1.swift (100%) rename {Source/SwiftLintFrameworkTests => Tests/SwiftLintFramework}/Resources/ProjectMock/Level1/Level2/.swiftlint.yml (100%) rename {Source/SwiftLintFrameworkTests => Tests/SwiftLintFramework}/Resources/ProjectMock/Level1/Level2/Level2.swift (100%) rename {Source/SwiftLintFrameworkTests => Tests/SwiftLintFramework}/Resources/ProjectMock/Level1/Level2/Level3/Level3.swift (100%) rename {Source/SwiftLintFrameworkTests => Tests/SwiftLintFramework}/Resources/test.yml (100%) rename {Source/SwiftLintFrameworkTests => Tests/SwiftLintFramework}/RuleConfigurationTests.swift (100%) rename {Source/SwiftLintFrameworkTests => Tests/SwiftLintFramework}/RuleTests.swift (100%) rename {Source/SwiftLintFrameworkTests => Tests/SwiftLintFramework}/RulesTests.swift (100%) rename {Source/SwiftLintFrameworkTests => Tests/SwiftLintFramework}/Supporting Files/Info.plist (100%) rename {Source/SwiftLintFrameworkTests => Tests/SwiftLintFramework}/TestHelpers.swift (100%) rename {Source/SwiftLintFrameworkTests => Tests/SwiftLintFramework}/Yaml+SwiftLintTests.swift (100%) rename {Source/SwiftLintFrameworkTests => Tests/SwiftLintFramework}/YamlParserTests.swift (100%) diff --git a/Source/SwiftLintFrameworkTests/main.swift b/Source/SwiftLintFrameworkTests/main.swift deleted file mode 100644 index f7cd3479a..000000000 --- a/Source/SwiftLintFrameworkTests/main.swift +++ /dev/null @@ -1,23 +0,0 @@ -// -// main.swift -// SwiftLint -// -// Created by 野村 憲男 on 2/3/16. -// Copyright © 2016 Realm. All rights reserved. -// - -import XCTest - -XCTMain([ - ConfigurationTests(), - CustomRulesTests(), - ExtendedNSStringTests(), - FunctionBodyLengthRuleTests(), - IntegrationTests(), - ReporterTests(), - RuleConfigurationsTests(), - RulesTests(), - RuleTests(), - YamlSwiftLintTests(), - YamlParserTests(), - ]) diff --git a/SwiftLint.xcodeproj/project.pbxproj b/SwiftLint.xcodeproj/project.pbxproj index 6dc89149b..9f1d49b1a 100644 --- a/SwiftLint.xcodeproj/project.pbxproj +++ b/SwiftLint.xcodeproj/project.pbxproj @@ -200,7 +200,6 @@ 695BE9CE1BDFD92B0071E985 /* CommaRule.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CommaRule.swift; sourceTree = ""; }; 6CB514E81C760C6900FA02C4 /* Structure+SwiftLint.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Structure+SwiftLint.swift"; sourceTree = ""; }; 6CC4259A1C77046200AEA885 /* SyntaxMap+SwiftLint.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "SyntaxMap+SwiftLint.swift"; sourceTree = ""; }; - 6CDD62CE1C6193300094A198 /* main.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = main.swift; sourceTree = ""; }; 83894F211B0C928A006214E1 /* RulesCommand.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RulesCommand.swift; sourceTree = ""; }; 83D71E261B131EB5000395DE /* RuleDescription.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RuleDescription.swift; sourceTree = ""; }; B58AEED51C492C7B00E901FD /* ForceUnwrappingRule.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ForceUnwrappingRule.swift; sourceTree = ""; }; @@ -490,7 +489,6 @@ D0D1212219E878CC005E4BAA /* Configuration */, D0D1217C19E87B05005E4BAA /* Supporting Files */, 3B12C9BE1C3209AC000B423F /* Resources */, - 6CDD62CE1C6193300094A198 /* main.swift */, E809EDA21B8A73FB00399043 /* ConfigurationTests.swift */, D4348EE91C46122C007707FB /* FunctionBodyLengthRuleTests.swift */, E832F10C1B17E725003F265F /* IntegrationTests.swift */, @@ -505,7 +503,7 @@ 3BB47D861C51DE6E00AE6A10 /* CustomRulesTests.swift */, ); name = SwiftLintFrameworkTests; - path = Source/SwiftLintFrameworkTests; + path = Tests/SwiftLintFramework; sourceTree = ""; }; D0D1217C19E87B05005E4BAA /* Supporting Files */ = { @@ -1018,7 +1016,7 @@ isa = XCBuildConfiguration; baseConfigurationReference = D0D1213419E878CC005E4BAA /* Mac-Application.xcconfig */; buildSettings = { - INFOPLIST_FILE = "Source/SwiftLintFrameworkTests/Supporting Files/Info.plist"; + INFOPLIST_FILE = "Tests/SwiftLintFramework/Supporting Files/Info.plist"; OTHER_SWIFT_FLAGS = "-D SWIFTLINT_XCODE_VERSION_$(XCODE_VERSION_MINOR)"; PRODUCT_BUNDLE_IDENTIFIER = "io.realm.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = SwiftLintFrameworkTests; @@ -1029,7 +1027,7 @@ isa = XCBuildConfiguration; baseConfigurationReference = D0D1213419E878CC005E4BAA /* Mac-Application.xcconfig */; buildSettings = { - INFOPLIST_FILE = "Source/SwiftLintFrameworkTests/Supporting Files/Info.plist"; + INFOPLIST_FILE = "Tests/SwiftLintFramework/Supporting Files/Info.plist"; OTHER_SWIFT_FLAGS = "-D SWIFTLINT_XCODE_VERSION_$(XCODE_VERSION_MINOR)"; PRODUCT_BUNDLE_IDENTIFIER = "io.realm.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = SwiftLintFrameworkTests; @@ -1074,7 +1072,7 @@ isa = XCBuildConfiguration; baseConfigurationReference = D0D1213419E878CC005E4BAA /* Mac-Application.xcconfig */; buildSettings = { - INFOPLIST_FILE = "Source/SwiftLintFrameworkTests/Supporting Files/Info.plist"; + INFOPLIST_FILE = "Tests/SwiftLintFramework/Supporting Files/Info.plist"; OTHER_SWIFT_FLAGS = "-D SWIFTLINT_XCODE_VERSION_$(XCODE_VERSION_MINOR)"; PRODUCT_BUNDLE_IDENTIFIER = "io.realm.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = SwiftLintFrameworkTests; @@ -1119,7 +1117,7 @@ isa = XCBuildConfiguration; baseConfigurationReference = D0D1213419E878CC005E4BAA /* Mac-Application.xcconfig */; buildSettings = { - INFOPLIST_FILE = "Source/SwiftLintFrameworkTests/Supporting Files/Info.plist"; + INFOPLIST_FILE = "Tests/SwiftLintFramework/Supporting Files/Info.plist"; OTHER_SWIFT_FLAGS = "-D SWIFTLINT_XCODE_VERSION_$(XCODE_VERSION_MINOR)"; PRODUCT_BUNDLE_IDENTIFIER = "io.realm.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = SwiftLintFrameworkTests; diff --git a/Source/SwiftLintFrameworkTests/ConfigurationTests.swift b/Tests/SwiftLintFramework/ConfigurationTests.swift similarity index 100% rename from Source/SwiftLintFrameworkTests/ConfigurationTests.swift rename to Tests/SwiftLintFramework/ConfigurationTests.swift diff --git a/Source/SwiftLintFrameworkTests/CustomRulesTests.swift b/Tests/SwiftLintFramework/CustomRulesTests.swift similarity index 100% rename from Source/SwiftLintFrameworkTests/CustomRulesTests.swift rename to Tests/SwiftLintFramework/CustomRulesTests.swift diff --git a/Source/SwiftLintFrameworkTests/ExtendedNSStringTests.swift b/Tests/SwiftLintFramework/ExtendedNSStringTests.swift similarity index 100% rename from Source/SwiftLintFrameworkTests/ExtendedNSStringTests.swift rename to Tests/SwiftLintFramework/ExtendedNSStringTests.swift diff --git a/Source/SwiftLintFrameworkTests/FunctionBodyLengthRuleTests.swift b/Tests/SwiftLintFramework/FunctionBodyLengthRuleTests.swift similarity index 100% rename from Source/SwiftLintFrameworkTests/FunctionBodyLengthRuleTests.swift rename to Tests/SwiftLintFramework/FunctionBodyLengthRuleTests.swift diff --git a/Source/SwiftLintFrameworkTests/IntegrationTests.swift b/Tests/SwiftLintFramework/IntegrationTests.swift similarity index 100% rename from Source/SwiftLintFrameworkTests/IntegrationTests.swift rename to Tests/SwiftLintFramework/IntegrationTests.swift diff --git a/Source/SwiftLintFrameworkTests/ReporterTests.swift b/Tests/SwiftLintFramework/ReporterTests.swift similarity index 100% rename from Source/SwiftLintFrameworkTests/ReporterTests.swift rename to Tests/SwiftLintFramework/ReporterTests.swift diff --git a/Source/SwiftLintFrameworkTests/Resources/ProjectMock/.swiftlint.yml b/Tests/SwiftLintFramework/Resources/ProjectMock/.swiftlint.yml similarity index 100% rename from Source/SwiftLintFrameworkTests/Resources/ProjectMock/.swiftlint.yml rename to Tests/SwiftLintFramework/Resources/ProjectMock/.swiftlint.yml diff --git a/Source/SwiftLintFrameworkTests/Resources/ProjectMock/Level0.swift b/Tests/SwiftLintFramework/Resources/ProjectMock/Level0.swift similarity index 100% rename from Source/SwiftLintFrameworkTests/Resources/ProjectMock/Level0.swift rename to Tests/SwiftLintFramework/Resources/ProjectMock/Level0.swift diff --git a/Source/SwiftLintFrameworkTests/Resources/ProjectMock/Level1/Level1.swift b/Tests/SwiftLintFramework/Resources/ProjectMock/Level1/Level1.swift similarity index 100% rename from Source/SwiftLintFrameworkTests/Resources/ProjectMock/Level1/Level1.swift rename to Tests/SwiftLintFramework/Resources/ProjectMock/Level1/Level1.swift diff --git a/Source/SwiftLintFrameworkTests/Resources/ProjectMock/Level1/Level2/.swiftlint.yml b/Tests/SwiftLintFramework/Resources/ProjectMock/Level1/Level2/.swiftlint.yml similarity index 100% rename from Source/SwiftLintFrameworkTests/Resources/ProjectMock/Level1/Level2/.swiftlint.yml rename to Tests/SwiftLintFramework/Resources/ProjectMock/Level1/Level2/.swiftlint.yml diff --git a/Source/SwiftLintFrameworkTests/Resources/ProjectMock/Level1/Level2/Level2.swift b/Tests/SwiftLintFramework/Resources/ProjectMock/Level1/Level2/Level2.swift similarity index 100% rename from Source/SwiftLintFrameworkTests/Resources/ProjectMock/Level1/Level2/Level2.swift rename to Tests/SwiftLintFramework/Resources/ProjectMock/Level1/Level2/Level2.swift diff --git a/Source/SwiftLintFrameworkTests/Resources/ProjectMock/Level1/Level2/Level3/Level3.swift b/Tests/SwiftLintFramework/Resources/ProjectMock/Level1/Level2/Level3/Level3.swift similarity index 100% rename from Source/SwiftLintFrameworkTests/Resources/ProjectMock/Level1/Level2/Level3/Level3.swift rename to Tests/SwiftLintFramework/Resources/ProjectMock/Level1/Level2/Level3/Level3.swift diff --git a/Source/SwiftLintFrameworkTests/Resources/test.yml b/Tests/SwiftLintFramework/Resources/test.yml similarity index 100% rename from Source/SwiftLintFrameworkTests/Resources/test.yml rename to Tests/SwiftLintFramework/Resources/test.yml diff --git a/Source/SwiftLintFrameworkTests/RuleConfigurationTests.swift b/Tests/SwiftLintFramework/RuleConfigurationTests.swift similarity index 100% rename from Source/SwiftLintFrameworkTests/RuleConfigurationTests.swift rename to Tests/SwiftLintFramework/RuleConfigurationTests.swift diff --git a/Source/SwiftLintFrameworkTests/RuleTests.swift b/Tests/SwiftLintFramework/RuleTests.swift similarity index 100% rename from Source/SwiftLintFrameworkTests/RuleTests.swift rename to Tests/SwiftLintFramework/RuleTests.swift diff --git a/Source/SwiftLintFrameworkTests/RulesTests.swift b/Tests/SwiftLintFramework/RulesTests.swift similarity index 100% rename from Source/SwiftLintFrameworkTests/RulesTests.swift rename to Tests/SwiftLintFramework/RulesTests.swift diff --git a/Source/SwiftLintFrameworkTests/Supporting Files/Info.plist b/Tests/SwiftLintFramework/Supporting Files/Info.plist similarity index 100% rename from Source/SwiftLintFrameworkTests/Supporting Files/Info.plist rename to Tests/SwiftLintFramework/Supporting Files/Info.plist diff --git a/Source/SwiftLintFrameworkTests/TestHelpers.swift b/Tests/SwiftLintFramework/TestHelpers.swift similarity index 100% rename from Source/SwiftLintFrameworkTests/TestHelpers.swift rename to Tests/SwiftLintFramework/TestHelpers.swift diff --git a/Source/SwiftLintFrameworkTests/Yaml+SwiftLintTests.swift b/Tests/SwiftLintFramework/Yaml+SwiftLintTests.swift similarity index 100% rename from Source/SwiftLintFrameworkTests/Yaml+SwiftLintTests.swift rename to Tests/SwiftLintFramework/Yaml+SwiftLintTests.swift diff --git a/Source/SwiftLintFrameworkTests/YamlParserTests.swift b/Tests/SwiftLintFramework/YamlParserTests.swift similarity index 100% rename from Source/SwiftLintFrameworkTests/YamlParserTests.swift rename to Tests/SwiftLintFramework/YamlParserTests.swift From 070bbb87ddad449ca9c790e49b03b500564411a3 Mon Sep 17 00:00:00 2001 From: Norio Nomura Date: Fri, 18 Mar 2016 00:10:05 +0900 Subject: [PATCH 08/14] [SPM] Update `Package.swift` --- Package.swift | 5 ----- 1 file changed, 5 deletions(-) diff --git a/Package.swift b/Package.swift index 7f2cb6134..9c6f88d2b 100644 --- a/Package.swift +++ b/Package.swift @@ -8,15 +8,10 @@ let package = Package( dependencies: [ .Target(name: "SwiftLintFramework") ]), - Target(name: "SwiftLintFrameworkTests", - dependencies: [ - .Target(name: "SwiftLintFramework") - ]), ], dependencies: [ .Package(url: "https://github.com/jpsim/SourceKitten.git", majorVersion: 0, minor: 11), .Package(url: "https://github.com/behrang/YamlSwift.git", majorVersion: 1), - .Package(url: "https://github.com/norio-nomura/swift-corelibs-xctest.git", majorVersion: 0), .Package(url: "https://github.com/scottrhoyt/SwiftyTextTable.git", majorVersion: 0, minor: 2), ] ) From 0a6faafee71c791bbb15b3d760064517af735e8f Mon Sep 17 00:00:00 2001 From: Norio Nomura Date: Sat, 19 Mar 2016 09:24:18 +0900 Subject: [PATCH 09/14] Update SwiftyTextTable to 0.3.0 --- Cartfile | 2 +- Cartfile.resolved | 2 +- Carthage/Checkouts/SwiftyTextTable | 2 +- Package.swift | 2 +- Source/swiftlint/Commands/RulesCommand.swift | 5 +++-- 5 files changed, 7 insertions(+), 6 deletions(-) diff --git a/Cartfile b/Cartfile index 7ec570411..79b2669ca 100644 --- a/Cartfile +++ b/Cartfile @@ -1,2 +1,2 @@ github "jpsim/SourceKitten" "0.11.0" -github "scottrhoyt/SwiftyTextTable" "0.2.1" +github "scottrhoyt/SwiftyTextTable" "0.3.0" diff --git a/Cartfile.resolved b/Cartfile.resolved index bd3e3c2dc..1812e9c45 100644 --- a/Cartfile.resolved +++ b/Cartfile.resolved @@ -1,6 +1,6 @@ github "antitypical/Result" "1.0.2" github "drmohundro/SWXMLHash" "2.1.0" -github "scottrhoyt/SwiftyTextTable" "0.2.1" +github "scottrhoyt/SwiftyTextTable" "0.3.0" github "behrang/YamlSwift" "1.4.2" github "jspahrsummers/xcconfigs" "0.9" github "Carthage/Commandant" "0.8.3" diff --git a/Carthage/Checkouts/SwiftyTextTable b/Carthage/Checkouts/SwiftyTextTable index 086590652..3fe6ead54 160000 --- a/Carthage/Checkouts/SwiftyTextTable +++ b/Carthage/Checkouts/SwiftyTextTable @@ -1 +1 @@ -Subproject commit 0865906521d21114eecedd197102030b1393c220 +Subproject commit 3fe6ead54269d67015e296ddb4d124b80a526ec4 diff --git a/Package.swift b/Package.swift index 9c6f88d2b..a731cc289 100644 --- a/Package.swift +++ b/Package.swift @@ -12,6 +12,6 @@ let package = Package( dependencies: [ .Package(url: "https://github.com/jpsim/SourceKitten.git", majorVersion: 0, minor: 11), .Package(url: "https://github.com/behrang/YamlSwift.git", majorVersion: 1), - .Package(url: "https://github.com/scottrhoyt/SwiftyTextTable.git", majorVersion: 0, minor: 2), + .Package(url: "https://github.com/scottrhoyt/SwiftyTextTable.git", majorVersion: 0, minor: 3), ] ) diff --git a/Source/swiftlint/Commands/RulesCommand.swift b/Source/swiftlint/Commands/RulesCommand.swift index 4286221c0..da1489cea 100644 --- a/Source/swiftlint/Commands/RulesCommand.swift +++ b/Source/swiftlint/Commands/RulesCommand.swift @@ -90,12 +90,13 @@ extension TextTable { } return nil }() - addRow(ruleID, + addRow([ + ruleID, (rule is OptInRule) ? "yes" : "no", (rule is CorrectableRule) ? "yes" : "no", configuredRule != nil ? "yes" : "no", (configuredRule ?? rule).configurationDescription - ) + ]) } } } From 55fce2c108013281b4289ce6b8774f6e64d82739 Mon Sep 17 00:00:00 2001 From: Norio Nomura Date: Sat, 19 Mar 2016 09:44:39 +0900 Subject: [PATCH 10/14] [SPM] Update Makefile to using `swift test` --- Makefile | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 43b2268d9..423afd084 100644 --- a/Makefile +++ b/Makefile @@ -17,7 +17,9 @@ VERSION_STRING=$(shell agvtool what-marketing-version -terse1) COMPONENTS_PLIST=Source/swiftlint/Supporting Files/Components.plist SWIFT_SNAPSHOT=swift-DEVELOPMENT-SNAPSHOT-2016-03-01-a -SWIFT_BUILD_COMMAND=/Library/Developer/Toolchains/$(SWIFT_SNAPSHOT).xctoolchain/usr/bin/swift build +SWIFT_COMMAND=/Library/Developer/Toolchains/$(SWIFT_SNAPSHOT).xctoolchain/usr/bin/swift +SWIFT_BUILD_COMMAND=$(SWIFT_COMMAND) build +SWIFT_TEST_COMMAND=$(SWIFT_COMMAND) test .PHONY: all bootstrap clean install package test uninstall @@ -84,8 +86,9 @@ swift_snapshot_install: spm: $(SWIFT_BUILD_COMMAND) +spm_test: PATH:=/Library/Developer/Toolchains/$(SWIFT_SNAPSHOT).xctoolchain/usr/bin/:$(PATH) spm_test: spm - .build/Debug/SwiftLintFrameworkTests + $(SWIFT_TEST_COMMAND) spm_clean: $(SWIFT_BUILD_COMMAND) --clean From 0408f1f58f02ab1604826c25f07fa4d90fd906f5 Mon Sep 17 00:00:00 2001 From: Norio Nomura Date: Sat, 19 Mar 2016 10:11:57 +0900 Subject: [PATCH 11/14] Add `Tests` to `include` in .swiftlint.yml --- .swiftlint.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.swiftlint.yml b/.swiftlint.yml index dfcd62057..8a8edf96a 100644 --- a/.swiftlint.yml +++ b/.swiftlint.yml @@ -1,4 +1,5 @@ included: - Source + - Tests opt_in_rules: - empty_count From ff29a2c9a286234085a6c15b59efa7b653eab799 Mon Sep 17 00:00:00 2001 From: Norio Nomura Date: Sat, 19 Mar 2016 10:14:29 +0900 Subject: [PATCH 12/14] [SPM] Remove obsoleted `XCTestCaseProvider.allTests` https://github.com/apple/swift-corelibs-xctest/blob/master/README.md#additional-considerations-for-swift-on-linux --- .../ConfigurationTests.swift | 21 ----------- .../SwiftLintFramework/CustomRulesTests.swift | 7 ---- .../ExtendedNSStringTests.swift | 6 ---- .../FunctionBodyLengthRuleTests.swift | 8 ----- .../SwiftLintFramework/IntegrationTests.swift | 5 --- Tests/SwiftLintFramework/ReporterTests.swift | 8 ----- .../RuleConfigurationTests.swift | 16 --------- Tests/SwiftLintFramework/RuleTests.swift | 21 ----------- Tests/SwiftLintFramework/RulesTests.swift | 35 ------------------- .../Yaml+SwiftLintTests.swift | 5 --- .../SwiftLintFramework/YamlParserTests.swift | 7 ---- 11 files changed, 139 deletions(-) diff --git a/Tests/SwiftLintFramework/ConfigurationTests.swift b/Tests/SwiftLintFramework/ConfigurationTests.swift index 5b0534d8c..d1d3ff8f9 100644 --- a/Tests/SwiftLintFramework/ConfigurationTests.swift +++ b/Tests/SwiftLintFramework/ConfigurationTests.swift @@ -25,27 +25,6 @@ extension Configuration { class ConfigurationTests: XCTestCase { - // protocol XCTestCaseProvider - lazy var allTests: [(String, () throws -> Void)] = [ - ("testInit", self.testInit), - ("testEmptyConfiguration", self.testEmptyConfiguration), - ("testWhitelistRules", self.testWhitelistRules), - ("testOtherRuleConfigurationsAlongsideWhitelistRules", - self.testOtherRuleConfigurationsAlongsideWhitelistRules), - ("testDisabledRules", self.testDisabledRules), - ("testDisabledRulesWithUnknownRule", self.testDisabledRulesWithUnknownRule), - ("testExcludedPaths", self.testExcludedPaths), - ("testIsEqualTo", self.testIsEqualTo), - ("testIsNotEqualTo", self.testIsNotEqualTo), - ("testMerge", self.testMerge), - ("testLevel0", self.testLevel0), - ("testLevel1", self.testLevel1), - ("testLevel2", self.testLevel2), - ("testLevel3", self.testLevel3), - ("testConfiguresCorrectlyFromDict", self.testConfiguresCorrectlyFromDict), - ("testConfigureFallsBackCorrectly", self.testConfigureFallsBackCorrectly), - ] - func testInit() { XCTAssert(Configuration(dict: [:]) != nil, "initializing Configuration with empty Dictionary should succeed") diff --git a/Tests/SwiftLintFramework/CustomRulesTests.swift b/Tests/SwiftLintFramework/CustomRulesTests.swift index 752d43efe..3c023fa35 100644 --- a/Tests/SwiftLintFramework/CustomRulesTests.swift +++ b/Tests/SwiftLintFramework/CustomRulesTests.swift @@ -13,13 +13,6 @@ import SourceKittenFramework class CustomRulesTests: XCTestCase { - // protocol XCTestCaseProvider - lazy var allTests: [(String, () throws -> Void)] = [ - ("testCustomRuleConfigurationSetsCorrectly", self.testCustomRuleConfigurationSetsCorrectly), - ("testCustomRuleConfigurationThrows", self.testCustomRuleConfigurationThrows), - ("testCustomRules", self.testCustomRules), - ] - func testCustomRuleConfigurationSetsCorrectly() { let configDict = ["my_custom_rule": ["name": "MyCustomRule", "message": "Message", diff --git a/Tests/SwiftLintFramework/ExtendedNSStringTests.swift b/Tests/SwiftLintFramework/ExtendedNSStringTests.swift index bc8cf0cf1..ab4792518 100644 --- a/Tests/SwiftLintFramework/ExtendedNSStringTests.swift +++ b/Tests/SwiftLintFramework/ExtendedNSStringTests.swift @@ -11,12 +11,6 @@ import XCTest class ExtendedNSStringTests: XCTestCase { - // protocol XCTestCaseProvider - lazy var allTests: [(String, () throws -> Void)] = [ - ("testLineAndCharacterForByteOffset_forContentsContainingMultibyteCharacters", - self.testLineAndCharacterForByteOffset_forContentsContainingMultibyteCharacters) - ] - func testLineAndCharacterForByteOffset_forContentsContainingMultibyteCharacters() { let contents = "" + "import Foundation\n" + // 18 characters diff --git a/Tests/SwiftLintFramework/FunctionBodyLengthRuleTests.swift b/Tests/SwiftLintFramework/FunctionBodyLengthRuleTests.swift index 7c03b8c96..1e4d5d817 100644 --- a/Tests/SwiftLintFramework/FunctionBodyLengthRuleTests.swift +++ b/Tests/SwiftLintFramework/FunctionBodyLengthRuleTests.swift @@ -15,14 +15,6 @@ private func funcWithBody(body: String) -> String { class FunctionBodyLengthRuleTests: XCTestCase { - // protocol XCTestCaseProvider - lazy var allTests: [(String, () throws -> Void)] = [ - ("testFunctionBodyLengths", self.testFunctionBodyLengths), - ("testFunctionBodyLengthsWithComments", self.testFunctionBodyLengthsWithComments), - ("testFunctionBodyLengthsWithMultilineComments", - self.testFunctionBodyLengthsWithMultilineComments), - ] - func testFunctionBodyLengths() { let longFunctionBody = funcWithBody( Repeat(count: 39, repeatedValue: "x = 0\n").joinWithSeparator("") diff --git a/Tests/SwiftLintFramework/IntegrationTests.swift b/Tests/SwiftLintFramework/IntegrationTests.swift index c90a38b21..c01ae1c7f 100644 --- a/Tests/SwiftLintFramework/IntegrationTests.swift +++ b/Tests/SwiftLintFramework/IntegrationTests.swift @@ -22,11 +22,6 @@ let config: Configuration = { class IntegrationTests: XCTestCase { - // protocol XCTestCaseProvider - lazy var allTests: [(String, () throws -> Void)] = [ - ("testSwiftLintLints", self.testSwiftLintLints), - ] - func testSwiftLintLints() { // This is as close as we're ever going to get to a self-hosting linter. let swiftFiles = config.lintableFilesForPath("") diff --git a/Tests/SwiftLintFramework/ReporterTests.swift b/Tests/SwiftLintFramework/ReporterTests.swift index 9d40b835e..108ee355e 100644 --- a/Tests/SwiftLintFramework/ReporterTests.swift +++ b/Tests/SwiftLintFramework/ReporterTests.swift @@ -11,14 +11,6 @@ import XCTest class ReporterTests: XCTestCase { - // protocol XCTestCaseProvider - lazy var allTests: [(String, () throws -> Void)] = [ - ("testXcodeReporter", self.testXcodeReporter), - ("testJSONReporter", self.testJSONReporter), - ("testCSVReporter", self.testCSVReporter), - ("testCheckstyleReporter", self.testCheckstyleReporter), - ] - func generateViolations() -> [StyleViolation] { let location = Location(file: "filename", line: 1, character: 2) return [ diff --git a/Tests/SwiftLintFramework/RuleConfigurationTests.swift b/Tests/SwiftLintFramework/RuleConfigurationTests.swift index fd9e09ff5..48dcdb166 100644 --- a/Tests/SwiftLintFramework/RuleConfigurationTests.swift +++ b/Tests/SwiftLintFramework/RuleConfigurationTests.swift @@ -12,22 +12,6 @@ import SourceKittenFramework class RuleConfigurationsTests: XCTestCase { - // protocol XCTestCaseProvider - lazy var allTests: [(String, () throws -> Void)] = [ - ("testNameConfigurationSetsCorrectly", self.testNameConfigurationSetsCorrectly), - ("testNameConfigurationThrowsOnBadConfig", self.testNameConfigurationThrowsOnBadConfig), - ("testNameConfigurationMinLengthThreshold", self.testNameConfigurationMinLengthThreshold), - ("testNameConfigurationMaxLengthThreshold", self.testNameConfigurationMaxLengthThreshold), - ("testSeverityConfigurationFromString", self.testSeverityConfigurationFromString), - ("testSeverityConfigurationFromDictionary", self.testSeverityConfigurationFromDictionary), - ("testSeverityConfigurationThrowsOnBadConfig", - self.testSeverityConfigurationThrowsOnBadConfig), - ("testSeverityLevelConfigParams", self.testSeverityLevelConfigParams), - ("testSeverityLevelConfigPartialParams", self.testSeverityLevelConfigPartialParams), - ("testRegexConfigurationThrows", self.testRegexConfigurationThrows), - ("testRegexRuleDescription", self.testRegexRuleDescription), - ] - func testNameConfigurationSetsCorrectly() { let config = [ "min_length": ["warning": 17, "error": 7], "max_length": ["warning": 170, "error": 700], diff --git a/Tests/SwiftLintFramework/RuleTests.swift b/Tests/SwiftLintFramework/RuleTests.swift index f6f4ce32c..37a82409d 100644 --- a/Tests/SwiftLintFramework/RuleTests.swift +++ b/Tests/SwiftLintFramework/RuleTests.swift @@ -21,27 +21,6 @@ struct RuleWithLevelsMock: ConfigurationProviderRule { class RuleTests: XCTestCase { - // protocol XCTestCaseProvider - lazy var allTests: [(String, () throws -> Void)] = [ - ("testRuleIsEqualTo", self.testRuleIsEqualTo), - ("testRuleIsNotEqualTo", self.testRuleIsNotEqualTo), - ("testRuleArraysWithDifferentCountsNotEqual", - self.testRuleArraysWithDifferentCountsNotEqual), - ("testSeverityLevelRuleInitsWithConfigDictionary", - self.testSeverityLevelRuleInitsWithConfigDictionary), - ("testSeverityLevelRuleInitsWithWarningOnlyConfigDictionary", - self.testSeverityLevelRuleInitsWithWarningOnlyConfigDictionary), - ("testSeverityLevelRuleInitsWithErrorOnlyConfigDictionary", - self.testSeverityLevelRuleInitsWithErrorOnlyConfigDictionary), - ("testSeverityLevelRuleInitsWithConfigArray", - self.testSeverityLevelRuleInitsWithConfigArray), - ("testSeverityLevelRuleInitsWithSingleValueConfigArray", - self.testSeverityLevelRuleInitsWithSingleValueConfigArray), - ("testSeverityLevelRuleInitsWithLiteral", self.testSeverityLevelRuleInitsWithLiteral), - ("testSeverityLevelRuleNotEqual", self.testSeverityLevelRuleNotEqual), - ("testDifferentSeverityLevelRulesNotEqual", self.testDifferentSeverityLevelRulesNotEqual), - ] - private struct RuleMock1: Rule { init() {} init(configuration: AnyObject) throws { self.init() } diff --git a/Tests/SwiftLintFramework/RulesTests.swift b/Tests/SwiftLintFramework/RulesTests.swift index a6e1a38e1..d75f28135 100644 --- a/Tests/SwiftLintFramework/RulesTests.swift +++ b/Tests/SwiftLintFramework/RulesTests.swift @@ -11,41 +11,6 @@ import XCTest class RulesTests: XCTestCase { - // protocol XCTestCaseProvider - lazy var allTests: [(String, () throws -> Void)] = [ - ("testClosingBrace", self.testClosingBrace), - ("testColon", self.testColon), - ("testComma", self.testComma), - ("testConditionalBindingCascade", self.testConditionalBindingCascade), - ("testControlStatement", self.testControlStatement), - ("testCyclomaticComplexity", self.testCyclomaticComplexity), - ("testEmptyCount", self.testEmptyCount), - ("testFileLength", self.testFileLength), - ("testForceCast", self.testForceCast), - ("testForceTry", self.testForceTry), - ("testForceUnwrapping", self.testForceUnwrapping), - ("testFunctionBodyLength", self.testFunctionBodyLength), - ("testFunctionParameterCountRule", self.testFunctionParameterCountRule), - ("testLeadingWhitespace", self.testLeadingWhitespace), - ("testLegacyConstant", self.testLegacyConstant), - ("testLegacyConstructor", self.testLegacyConstructor), - ("testLineLength", self.testLineLength), - ("testMissingDocs", self.testMissingDocs), - ("testNesting", self.testNesting), - ("testOpeningBrace", self.testOpeningBrace), - ("testOperatorFunctionWhitespace", self.testOperatorFunctionWhitespace), - ("testReturnArrowWhitespace", self.testReturnArrowWhitespace), - ("testStatementPosition", self.testStatementPosition), - ("testTodo", self.testTodo), - ("testTrailingNewline", self.testTrailingNewline), - ("testTrailingSemicolon", self.testTrailingSemicolon), - ("testTrailingWhitespace", self.testTrailingWhitespace), - ("testTypeBodyLength", self.testTypeBodyLength), - ("testTypeName", self.testTypeName), - ("testValidDocs", self.testValidDocs), - ("testVariableName", self.testVariableName), - ] - func testClosingBrace() { verifyRule(ClosingBraceRule.description) } diff --git a/Tests/SwiftLintFramework/Yaml+SwiftLintTests.swift b/Tests/SwiftLintFramework/Yaml+SwiftLintTests.swift index b8228896e..a73d9b3a3 100644 --- a/Tests/SwiftLintFramework/Yaml+SwiftLintTests.swift +++ b/Tests/SwiftLintFramework/Yaml+SwiftLintTests.swift @@ -13,11 +13,6 @@ import Yaml class YamlSwiftLintTests: XCTestCase { - // protocol XCTestCaseProvider - lazy var allTests: [(String, () throws -> Void)] = [ - ("testFlattenYaml", self.testFlattenYaml), - ] - func testFlattenYaml() { let yamlResult = Yaml.load(getTestYaml()) if let error = yamlResult.error { diff --git a/Tests/SwiftLintFramework/YamlParserTests.swift b/Tests/SwiftLintFramework/YamlParserTests.swift index c556fe059..74d011a98 100644 --- a/Tests/SwiftLintFramework/YamlParserTests.swift +++ b/Tests/SwiftLintFramework/YamlParserTests.swift @@ -11,13 +11,6 @@ import XCTest class YamlParserTests: XCTestCase { - // protocol XCTestCaseProvider - lazy var allTests: [(String, () throws -> Void)] = [ - ("testParseEmptyString", self.testParseEmptyString), - ("testParseValidString", self.testParseValidString), - ("testParseInvalidStringThrows", self.testParseInvalidStringThrows), - ] - // swiftlint:disable force_try func testParseEmptyString() { XCTAssertEqual((try! YamlParser.parse("")).count, 0, From 46ba7cb18167a4006781266b15487d15002fce37 Mon Sep 17 00:00:00 2001 From: Norio Nomura Date: Fri, 25 Mar 2016 10:18:21 +0900 Subject: [PATCH 13/14] [SPM] Disable `make spm_test` on Travis-CI until SR-989 will be fixed https://bugs.swift.org/browse/SR-989 --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 401329a20..d60a46acf 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,7 +10,7 @@ matrix: include: - script: set -o pipefail && script/cibuild | xcpretty env: JOB=Xcode - - script: make spm_test + - script: make spm env: JOB=SPM before_install: - make swift_snapshot_install From d23cf7157b8b94ac81604b968de9d6e41a57fd1b Mon Sep 17 00:00:00 2001 From: Norio Nomura Date: Fri, 25 Mar 2016 10:19:12 +0900 Subject: [PATCH 14/14] Add changelog entry --- CHANGELOG.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 887de33ac..c987be3aa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,23 @@ +## Master + +##### Breaking + +* None. + +##### Enhancements + +* Now `libclang.dylib` and `sourcekitd.framework` are dynamically loaded at + runtime by SourceKittenFramework to use the versions included in the Xcode + version specified by `xcode-select -p` or custom toolchains. + [Norio Nomura](https://github.com/norio-nomura) + [#167](https://github.com/jpsim/SourceKitten/issues/167) + +##### Bug Fixes + +* Failed to launch swiftlint when Xcode.app was placed at non standard path. + [Norio Nomura](https://github.com/norio-nomura) + [#593](https://github.com/realm/SwiftLint/issues/593) + ## 0.9.2: Multiple Exhaust Codes ##### Breaking