Skip to content

Commit

Permalink
Update dependencies
Browse files Browse the repository at this point in the history
- Update SourceKitten from 0.19.1 to 0.20.0
- Update SWXMLHash from 4.3.6 to 4.6.0
- Update Yams from 0.5.0 to 0.7.0
  • Loading branch information
norio-nomura committed Apr 8, 2018
1 parent c501107 commit 7d0f239
Show file tree
Hide file tree
Showing 11 changed files with 33 additions and 46 deletions.
2 changes: 1 addition & 1 deletion Cartfile
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
github "jpsim/SourceKitten" ~> 0.19.1
github "jpsim/SourceKitten" ~> 0.20.0
github "scottrhoyt/SwiftyTextTable" ~> 0.8.0
2 changes: 1 addition & 1 deletion Cartfile.private
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
github "Carthage/Commandant" ~> 0.13.0
github "jspahrsummers/xcconfigs" "4ac967d12f72c2ccc7f34d163268d09296923a7c"
github "jpsim/Yams" ~> 0.5
github "jpsim/Yams" ~> 0.7
6 changes: 3 additions & 3 deletions Cartfile.resolved
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
github "Carthage/Commandant" "0.13.0"
github "antitypical/Result" "3.2.4"
github "drmohundro/SWXMLHash" "4.3.6"
github "jpsim/SourceKitten" "0.19.1"
github "jpsim/Yams" "0.5.0"
github "drmohundro/SWXMLHash" "4.6.0"
github "jpsim/SourceKitten" "0.20.0"
github "jpsim/Yams" "0.7.0"
github "jspahrsummers/xcconfigs" "4ac967d12f72c2ccc7f34d163268d09296923a7c"
github "scottrhoyt/SwiftyTextTable" "0.8.0"
2 changes: 1 addition & 1 deletion Carthage/Checkouts/SourceKitten
Submodule SourceKitten updated 71 files
+29 −5 .circleci/config.yml
+1 −1 .swift-version
+53 −0 CHANGELOG.md
+2 −2 Cartfile
+3 −3 Cartfile.resolved
+1 −1 Carthage/Checkouts/SWXMLHash
+1 −1 Carthage/Checkouts/Yams
+1 −1 Carthage/Checkouts/xcconfigs
+3 −0 Gemfile
+76 −0 Gemfile.lock
+15 −15 Package.resolved
+2 −2 Package.swift
+53 −50 README.md
+1 −1 Source/SourceKittenFramework/Clang+SourceKitten.swift
+3 −3 Source/SourceKittenFramework/ClangTranslationUnit.swift
+29 −23 Source/SourceKittenFramework/File.swift
+1 −1 Source/SourceKittenFramework/Info.plist
+2 −2 Source/SourceKittenFramework/Module.swift
+1 −1 Source/SourceKittenFramework/OffsetMap.swift
+80 −159 Source/SourceKittenFramework/Request.swift
+1 −1 Source/SourceKittenFramework/SourceDeclaration.swift
+133 −0 Source/SourceKittenFramework/SourceKitObject.swift
+1 −1 Source/SourceKittenFramework/StatementKind.swift
+64 −8 Source/SourceKittenFramework/String+SourceKitten.swift
+90 −0 Source/SourceKittenFramework/SwiftDeclarationAttributeKind.swift
+1 −1 Source/SourceKittenFramework/SwiftDeclarationKind.swift
+4 −2 Source/SourceKittenFramework/SwiftDocKey.swift
+1 −1 Source/SourceKittenFramework/SwiftDocs.swift
+0 −5 Source/SourceKittenFramework/SwiftLangSyntax.swift
+1 −1 Source/SourceKittenFramework/SyntaxKind.swift
+1 −1 Source/SourceKittenFramework/SyntaxMap.swift
+60 −0 Source/SourceKittenFramework/UID.swift
+1 −1 Source/SourceKittenFramework/Version.swift
+5 −0 Source/SourceKittenFramework/Xcode.swift
+71 −5 Source/SourceKittenFramework/library_wrapper.swift
+19 −0 Source/SourceKittenFramework/shim.swift
+9 −7 Source/sourcekitten/IndexCommand.swift
+1 −1 Source/sourcekitten/Info.plist
+47 −0 Source/sourcekitten/ModuleInfoCommand.swift
+1 −0 Source/sourcekitten/main.swift
+8 −0 SourceKitten.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
+1 −1 SourceKittenFramework.podspec
+2 −0 Tests/LinuxMain.swift
+3 −3 Tests/SourceKittenFrameworkTests/ClangTranslationUnitTests.swift
+8 −1 Tests/SourceKittenFrameworkTests/FileTests.swift
+715 −0 Tests/SourceKittenFrameworkTests/Fixtures/Bicycle@swift-3.3.json
+780 −0 Tests/SourceKittenFrameworkTests/Fixtures/BicycleIndex@swift-3.3.json
+4,651 −4,651 Tests/SourceKittenFrameworkTests/Fixtures/Commandant@swift-3.2.json
+7,318 −0 Tests/SourceKittenFrameworkTests/Fixtures/Commandant@swift-3.3.json
+905 −53 Tests/SourceKittenFrameworkTests/Fixtures/CommandantSPM@swift-3.2.json
+7,214 −0 Tests/SourceKittenFrameworkTests/Fixtures/CommandantSPM@swift-3.3.json
+207 −0 Tests/SourceKittenFrameworkTests/Fixtures/DocInfo@swift-3.3.json
+301 −0 Tests/SourceKittenFrameworkTests/Fixtures/Extension@swift-3.3.json
+721 −0 Tests/SourceKittenFrameworkTests/Fixtures/LinuxBicycle@swift-3.3.json
+709 −0 Tests/SourceKittenFrameworkTests/Fixtures/LinuxBicycleIndex@swift-3.3.json
+902 −53 Tests/SourceKittenFrameworkTests/Fixtures/LinuxCommandantSPM@swift-3.2.json
+7,262 −0 Tests/SourceKittenFrameworkTests/Fixtures/LinuxCommandantSPM@swift-3.3.json
+331 −0 Tests/SourceKittenFrameworkTests/Fixtures/LinuxSimpleCodeCompletion@swift-3.3.json
+214 −0 Tests/SourceKittenFrameworkTests/Fixtures/ModuleInfo@swift-3.3.json
+364 −0 Tests/SourceKittenFrameworkTests/Fixtures/SimpleCodeCompletion@swift-3.3.json
+65 −0 Tests/SourceKittenFrameworkTests/Fixtures/Subscript@swift-3.3.json
+35 −10 Tests/SourceKittenFrameworkTests/ModuleTests.swift
+4 −0 Tests/SourceKittenFrameworkTests/OffsetMapTests.swift
+38 −0 Tests/SourceKittenFrameworkTests/SourceKitObjectTests.swift
+114 −1 Tests/SourceKittenFrameworkTests/SourceKitTests.swift
+35 −0 Tests/SourceKittenFrameworkTests/StructureTests.swift
+37 −0 Tests/SourceKittenFrameworkTests/SwiftDocKeyTests.swift
+3 −3 Tests/SourceKittenFrameworkTests/SwiftDocsTests.swift
+33 −43 sourcekitten.xcodeproj/project.pbxproj
+3 −3 sourcekitten.xcodeproj/xcshareddata/xcschemes/SourceKittenFramework.xcscheme
+1 −3 sourcekitten.xcodeproj/xcshareddata/xcschemes/sourcekitten.xcscheme
26 changes: 13 additions & 13 deletions Package.resolved
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,6 @@
"version": "3.2.4"
}
},
{
"package": "SWXMLHash",
"repositoryURL": "https://github.com/drmohundro/SWXMLHash.git",
"state": {
"branch": null,
"revision": "4e7f5af6331735d39fc357b2c71c3bb15af97c8f",
"version": "4.3.6"
}
},
{
"package": "SourceKit",
"repositoryURL": "https://github.com/norio-nomura/SourceKit.git",
Expand All @@ -69,8 +60,8 @@
"repositoryURL": "https://github.com/jpsim/SourceKitten.git",
"state": {
"branch": null,
"revision": "e06eb730499439ae32c5fbb6f72809ebec2371fd",
"version": "0.19.1"
"revision": "b6b10419ee439167ba6f7bd928ad30754ff5eb5d",
"version": "0.20.0"
}
},
{
Expand All @@ -82,13 +73,22 @@
"version": "0.8.0"
}
},
{
"package": "SWXMLHash",
"repositoryURL": "https://github.com/drmohundro/SWXMLHash.git",
"state": {
"branch": null,
"revision": "17d992beb3aaeda403fd35f8d5e70ab1a8124f35",
"version": "4.6.0"
}
},
{
"package": "Yams",
"repositoryURL": "https://github.com/jpsim/Yams.git",
"state": {
"branch": null,
"revision": "95f45caf07472ec78223ebada45255086a85b01a",
"version": "0.5.0"
"revision": "6652aa7b793d3c8a075db0614acb575fcaecf457",
"version": "0.7.0"
}
}
]
Expand Down
4 changes: 2 additions & 2 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ let package = Package(
],
dependencies: [
.package(url: "https://github.com/Carthage/Commandant.git", from: "0.13.0"),
.package(url: "https://github.com/jpsim/SourceKitten.git", from: "0.19.1"),
.package(url: "https://github.com/jpsim/Yams.git", from: "0.5.0"),
.package(url: "https://github.com/jpsim/SourceKitten.git", from: "0.20.0"),
.package(url: "https://github.com/jpsim/Yams.git", from: "0.7.0"),
.package(url: "https://github.com/scottrhoyt/SwiftyTextTable.git", from: "0.8.0"),
],
targets: [
Expand Down
2 changes: 0 additions & 2 deletions Source/SwiftLintFramework/Extensions/File+SwiftLint.swift
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,6 @@ extension File {
fileHandle.write(stringData)
fileHandle.closeFile()
contents += string
lines = contents.bridge().lines()
}

internal func write<S: StringProtocol>(_ string: S) {
Expand All @@ -262,7 +261,6 @@ extension File {
}
contents = String(string)
invalidateCache()
lines = contents.bridge().lines()
}

internal func ruleEnabled(violatingRanges: [NSRange], for rule: Rule) -> [NSRange] {
Expand Down
27 changes: 8 additions & 19 deletions Source/SwiftLintFramework/Models/YamlParser.swift
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@ public struct YamlParser {

private extension Constructor {
static func swiftlintContructor(env: [String: String]) -> Constructor {
return Constructor(customMap(env: env))
return Constructor(customScalarMap(env: env))
}

static func customMap(env: [String: String]) -> Map {
var map = defaultMap
static func customScalarMap(env: [String: String]) -> ScalarMap {
var map = defaultScalarMap
map[.str] = String.constructExpandingEnvVars(env: env)
map[.bool] = Bool.constructUsingOnlyTrueAndFalse

Expand All @@ -51,10 +51,9 @@ private extension Constructor {
}

private extension String {
static func constructExpandingEnvVars(env: [String: String]) -> (_ node: Node) -> String? {
return { (node: Node) -> String? in
assert(node.isScalar)
return node.scalar!.string.expandingEnvVars(env: env)
static func constructExpandingEnvVars(env: [String: String]) -> (_ scalar: Node.Scalar) -> String? {
return { (scalar: Node.Scalar) -> String? in
return scalar.string.expandingEnvVars(env: env)
}
}

Expand All @@ -69,9 +68,8 @@ private extension String {
}

private extension Bool {
static func constructUsingOnlyTrueAndFalse(from node: Node) -> Bool? {
assert(node.isScalar)
switch node.scalar!.string.lowercased() {
static func constructUsingOnlyTrueAndFalse(from scalar: Node.Scalar) -> Bool? {
switch scalar.string.lowercased() {
case "true":
return true
case "false":
Expand All @@ -81,12 +79,3 @@ private extension Bool {
}
}
}

private extension Node {
var isScalar: Bool {
if case .scalar = self {
return true
}
return false
}
}
4 changes: 2 additions & 2 deletions SwiftLintFramework.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ Pod::Spec.new do |s|
s.platform = :osx, '10.10'
s.source_files = 'Source/SwiftLintFramework/**/*.swift'
s.pod_target_xcconfig = { 'APPLICATION_EXTENSION_API_ONLY' => 'YES' }
s.dependency 'SourceKittenFramework', '~> 0.18'
s.dependency 'Yams', '~> 0.4'
s.dependency 'SourceKittenFramework', '~> 0.20'
s.dependency 'Yams', '~> 0.7'
end

0 comments on commit 7d0f239

Please sign in to comment.