Skip to content

Commit

Permalink
Use linux friendly methods
Browse files Browse the repository at this point in the history
  • Loading branch information
sammy-SC committed Sep 17, 2017
1 parent fb4316d commit db1fca5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Source/SwiftLintFramework/Rules/SortedImportsRule.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ import SourceKittenFramework

private extension Line {
var contentRange: NSRange {
return NSRange(location: range.location, length: content.count)
return NSRange(location: range.location, length: content.characters.count)
}

// `Line` in this rule always contains word import
// This method returns contents of line that are after import
private func afterImport() -> String {
guard let range = content.range(of: "import ") else { return "" }
return String(content.suffix(from: range.upperBound))
return String(content.characters.suffix(from: range.upperBound))
}

// Case insensitive comparission of contents of the line
Expand Down

0 comments on commit db1fca5

Please sign in to comment.