Skip to content

Commit 090d4f8

Browse files
authored
Remove module name replacement (#38)
I don't understand why we added this, the context was: > the previous where testableImports.contains(dependentUnit.moduleName) > would skip over the test files because test files would never show up > in testableImports i.e. we don't ever see @testable import > FooTests. But I don't get that reasoning because you shouldn't ever be testable importing your own module or any other Tests module, and if you have a naming scheme where you do I don't think you want to skip them.
1 parent 315fb43 commit 090d4f8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Sources/unnecessary-testable/main.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ func main(indexStorePath: String) {
188188
continue
189189
}
190190

191-
let moduleName = dependentUnit.moduleName.replacingOccurrences(of: "Tests", with: "")
191+
let moduleName = dependentUnit.moduleName
192192
guard testableImports.contains(moduleName) else {
193193
continue
194194
}

0 commit comments

Comments
 (0)