Skip to content

Commit

Permalink
Eliminated unneeded local variable.
Browse files Browse the repository at this point in the history
  • Loading branch information
scottrhoyt committed Feb 2, 2016
1 parent d13fda8 commit 138750d
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions Source/SwiftLintFramework/Extensions/File+SwiftLint.swift
Original file line number Diff line number Diff line change
Expand Up @@ -119,11 +119,11 @@ extension File {
if matches.isEmpty {
return []
}
let exclusions = regex(excludingPattern).matchesInString(self.contents,
options: [],
range: range)
let excludedRanges = exclusions.ranges()
return matches.filter { !$0.intersectsRanges(excludedRanges) }
let exclusionRanges = regex(excludingPattern).matchesInString(self.contents,
options: [],
range: range)
.ranges()
return matches.filter { !$0.intersectsRanges(exclusionRanges) }
}

public func validateVariableName(dictionary: XPCDictionary, kind: SwiftDeclarationKind) ->
Expand Down

0 comments on commit 138750d

Please sign in to comment.