Merge pull request #326 from brentleyjones/fix-excludes

Fix excluding directories that have sub-directories
This commit is contained in:
Yonas Kolb
2018-07-01 22:39:25 +10:00
committed by GitHub
2 changed files with 10 additions and 1 deletions
+1 -1
View File
@@ -241,7 +241,7 @@ class SourceGenerator {
return [$0]
}
return (try? $0.recursiveChildren().filter { $0.isFile }) ?? []
return (try? $0.recursiveChildren()) ?? []
}
.reduce([], +)
}
@@ -206,6 +206,10 @@ class SourceGeneratorTests: XCTestCase {
- a.ignored
- project.xcodeproj:
- project.pbxproj
- a.playground:
- Sources:
- a.swift
- Resources
"""
try createDirectories(directories)
@@ -220,6 +224,7 @@ class SourceGeneratorTests: XCTestCase {
"ignore.file",
"*.ignored",
"*.xcodeproj",
"*.playground",
// not supported
// "**/*.ignored",
]
@@ -248,6 +253,10 @@ class SourceGeneratorTests: XCTestCase {
try pbxProj.expectFileMissing(paths: ["Sources", "a.ignored"])
try pbxProj.expectFileMissing(paths: ["Sources", "ignore.file"])
try pbxProj.expectFileMissing(paths: ["Sources", "project.xcodeproj"])
try pbxProj.expectFileMissing(paths: ["Sources", "a.playground"])
// not supported: "**/*.ignored"
// try pbxProj.expectFileMissing(paths: ["Sources", "A", "a.ignored"])
// try pbxProj.expectFileMissing(paths: ["Sources", "A", "B", "b.ignored"])
}
$0.it("generates file sources") {