Skip to content

Commit

Permalink
Deduplicate files in the current directory. Fixes #154.
Browse files Browse the repository at this point in the history
  • Loading branch information
jpsim committed Oct 6, 2015
1 parent 9321dfd commit 0fd573c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@
[JP Simard](https://github.com/jpsim)
[#151](https://github.com/realm/SwiftLint/issues/151)

* Deduplicate files in the current directory.
[JP Simard](https://github.com/jpsim)
[#154](https://github.com/realm/SwiftLint/issues/154)


## 0.2.0: Tumble Dry

Expand Down
5 changes: 2 additions & 3 deletions Source/SwiftLintFramework/NSFileManager+SwiftLint.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ import Foundation

extension NSFileManager {
public func allFilesRecursively(directory directory: String) -> [String] {
let relativeFiles = (try! contentsOfDirectoryAtPath(directory)) +
(try! subpathsOfDirectoryAtPath(directory))
return relativeFiles.map((directory as NSString).stringByAppendingPathComponent)
return try! subpathsOfDirectoryAtPath(directory)
.map((directory as NSString).stringByAppendingPathComponent)
}
}

0 comments on commit 0fd573c

Please sign in to comment.