False Positive: Subclasses of subclasses of XCTestCase
noahsark769 opened this issue · 2 comments
noahsark769 commented
If you have a subclass of XCTestCase (e.g. a BaseTestCase where you put your generic testing utilities), Pecker currently reports tests that inherit from this subclass these as unused. For example:
import XCTest
class BaseTestCase: XCTestCase {
}
extension BaseTestCase {
func a() {
print("a")
}
}
class TestCase: BaseTestCase { // currently reported as unused
func test() { // currently reported as unused
self.a()
}
}
Working example in repo: https://github.com/noahsark769/NGPeckerExamples/blob/master/NGPeckerExamplesTests/XCTestSuperclassMethodUsedBySubclass.swift#L11
noahsark769 commented
Ah oops, you're right! Sorry!