Skip to content

Commit

Permalink
Merge pull request #608 from realm/nn-swift22
Browse files Browse the repository at this point in the history
[WIP] Swift 2.2
  • Loading branch information
jpsim committed Apr 7, 2016
2 parents 18bc70c + b2326b8 commit 5ba1579
Show file tree
Hide file tree
Showing 11 changed files with 17 additions and 17 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
language: objective-c
osx_image: xcode7.2
osx_image: xcode7.3
git:
submodules: false
branches:
Expand Down
4 changes: 2 additions & 2 deletions Cartfile
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
github "jpsim/SourceKitten" "0.11.0"
github "scottrhoyt/SwiftyTextTable" "0.3.0"
github "jpsim/SourceKitten" "master"
github "scottrhoyt/SwiftyTextTable"
10 changes: 5 additions & 5 deletions Cartfile.resolved
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
github "antitypical/Result" "1.0.2"
github "drmohundro/SWXMLHash" "2.1.0"
github "antitypical/Result" "2.0.0"
github "drmohundro/SWXMLHash" "2.2.0"
github "scottrhoyt/SwiftyTextTable" "0.3.0"
github "behrang/YamlSwift" "1.4.2"
github "behrang/YamlSwift" "1.4.3"
github "jspahrsummers/xcconfigs" "0.9"
github "Carthage/Commandant" "0.8.3"
github "jpsim/SourceKitten" "0.11.0"
github "Carthage/Commandant" "0.10.0"
github "jpsim/SourceKitten" "fc877bd19f69ea5c0fc8667f29d0a114373d4ce7"
2 changes: 1 addition & 1 deletion Carthage/Checkouts/SourceKitten
Submodule SourceKitten updated 2 files
+5 −0 .gitignore
+14 −0 CHANGELOG.md
2 changes: 1 addition & 1 deletion Source/SwiftLintFramework/Protocols/Rule.swift
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ extension Rule {
public protocol OptInRule: Rule {}

public protocol ConfigurationProviderRule: Rule {
typealias ConfigurationType: RuleConfiguration
associatedtype ConfigurationType: RuleConfiguration
var configuration: ConfigurationType { get set }
}

Expand Down
2 changes: 1 addition & 1 deletion Source/SwiftLintFramework/Rules/VariableNameRule.swift
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public struct VariableNameRule: ASTRule, ConfigurationProviderRule {
let firstCharacter = name.substringToIndex(secondIndex)
if firstCharacter.isUppercase() {
if name.characters.count > 1 {
let range = Range(start: secondIndex, end: secondIndex.successor())
let range = secondIndex..<secondIndex.successor()
let secondCharacter = name.substringWithRange(range)
return secondCharacter.isLowercase()
}
Expand Down
4 changes: 2 additions & 2 deletions Tests/SwiftLintFramework/IntegrationTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import SwiftLintFramework
import XCTest

let config: Configuration = {
let directory = (((__FILE__ as NSString)
let directory = (((#file as NSString)
.stringByDeletingLastPathComponent as NSString)
.stringByDeletingLastPathComponent as NSString)
.stringByDeletingLastPathComponent
Expand All @@ -25,7 +25,7 @@ class IntegrationTests: XCTestCase {
func testSwiftLintLints() {
// This is as close as we're ever going to get to a self-hosting linter.
let swiftFiles = config.lintableFilesForPath("")
XCTAssert(swiftFiles.map({$0.path!}).contains(__FILE__), "current file should be included")
XCTAssert(swiftFiles.map({$0.path!}).contains(#file), "current file should be included")

#if SWIFTLINT_XCODE_VERSION_0730 || SWIFT_PACKAGE
XCTAssertEqual(swiftFiles.flatMap({
Expand Down

0 comments on commit 5ba1579

Please sign in to comment.