Skip to content

Commit

Permalink
Update SourceKitten to 0.30.1 (realm#3367)
Browse files Browse the repository at this point in the history
  • Loading branch information
jpsim authored Sep 23, 2020
1 parent 2731f99 commit 15c25ab
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 14 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.30.0
github "jpsim/SourceKitten" ~> 0.30.1
github "scottrhoyt/SwiftyTextTable" ~> 0.9.0
2 changes: 1 addition & 1 deletion Cartfile.resolved
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
github "Carthage/Commandant" "0.17.0"
github "drmohundro/SWXMLHash" "5.0.1"
github "jpsim/SourceKitten" "0.30.0"
github "jpsim/SourceKitten" "0.30.1"
github "jpsim/Yams" "4.0.0"
github "jspahrsummers/xcconfigs" "0.12"
github "scottrhoyt/SwiftyTextTable" "0.9.0"
4 changes: 2 additions & 2 deletions Package.resolved
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@
"repositoryURL": "https://github.com/jpsim/SourceKitten.git",
"state": {
"branch": null,
"revision": "b7a7df0d25981998bb9f4770ff8faf7a28a6e649",
"version": "0.30.0"
"revision": "c0f960f72fa1e6151695074ffa696e4da6c45ce8",
"version": "0.30.1"
}
},
{
Expand Down
2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ let package = Package(
],
dependencies: [
.package(url: "https://github.com/Carthage/Commandant.git", .upToNextMinor(from: "0.17.0")),
.package(url: "https://github.com/jpsim/SourceKitten.git", .upToNextMinor(from: "0.30.0")),
.package(url: "https://github.com/jpsim/SourceKitten.git", .upToNextMinor(from: "0.30.1")),
.package(url: "https://github.com/jpsim/Yams.git", from: "4.0.0"),
.package(url: "https://github.com/scottrhoyt/SwiftyTextTable.git", from: "0.9.0"),
] + (addCryptoSwift ? [.package(url: "https://github.com/krzyzanowskim/CryptoSwift.git", .upToNextMinor(from: "1.0.0"))] : []),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ private extension SwiftLintFile {
}

if indexEntity.shouldSkipIndexEntityToWorkAroundSR11985() ||
indexEntity.isIndexEntityUsedForSwiftUI() ||
indexEntity.isIndexEntitySwiftUIProvider() ||
indexEntity.enclosedSwiftAttributes.contains(where: declarationAttributesToSkip.contains) ||
indexEntity.value["key.is_implicit"] as? Bool == true ||
indexEntity.value["key.is_test_candidate"] as? Bool == true {
Expand Down Expand Up @@ -221,12 +221,6 @@ private extension SourceKittenDictionary {
return nil
}

func isIndexEntityUsedForSwiftUI() -> Bool {
return isIndexEntitySwiftUIProvider() ||
// Move to `declarationAttributesToSkip` when we can use https://github.com/jpsim/SourceKitten/pull/670
swiftAttributes.contains(where: { $0.attribute == "source.decl.attribute.main" })
}

func isIndexEntitySwiftUIProvider() -> Bool {
return (value["key.related"] as? [[String: SourceKitRepresentable]])?
.map(SourceKittenDictionary.init)
Expand Down Expand Up @@ -276,6 +270,7 @@ private let declarationAttributesToSkip: Set<SwiftDeclarationAttributeKind> = [
.ibaction,
.ibinspectable,
.iboutlet,
.main,
.nsApplicationMain,
.override,
.uiApplicationMain
Expand Down
2 changes: 1 addition & 1 deletion SwiftLintFramework.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ Pod::Spec.new do |s|
s.source_files = 'Source/SwiftLintFramework/**/*.swift'
s.swift_versions = ['5.1', '5.2']
s.pod_target_xcconfig = { 'APPLICATION_EXTENSION_API_ONLY' => 'YES' }
s.dependency 'SourceKittenFramework', '~> 0.30.0'
s.dependency 'SourceKittenFramework', '~> 0.30.1'
s.dependency 'Yams', '~> 4.0'
end

0 comments on commit 15c25ab

Please sign in to comment.