-
Notifications
You must be signed in to change notification settings - Fork 22
Open
Description
The following query tags classes that inherit XCTestCase as swift_xctest_class, but only if subclassed directly. In our codebase, we have our own base test case class that subclasses XCTestCase, and all of our tests subclass that (and sometimes even deeper).
swift/languages/swift/runnables.scm
Lines 60 to 71 in e91e66b
| ;; XCTestCase subclass | |
| ( | |
| (class_declaration | |
| name: (type_identifier) @SWIFT_TEST_CLASS | |
| (inheritance_specifier | |
| inherits_from: (user_type | |
| (type_identifier) @run (#eq? @run "XCTestCase") | |
| ) | |
| ) | |
| ) @_swift-xctest-class | |
| (#set! tag swift-xctest-class) | |
| ) |
I don't know much about treesitter scm. Is there a way to modify this query so that my test case classes are tagged with swift_xctest_class?
Metadata
Metadata
Assignees
Labels
No labels