Could this restrict searches to test vs non-test code (in Rust)? #6
Replies: 1 comment
-
Hi @dandavison. Thanks for the question, I think this is an interesting idea. This kind of thing can be done in a "best-effort" way, i.e. it won't be perfect, but may work in majority of the cases. Any Rust parser can be used to distinguish a function like #[test]
fn f() { ... } from fn g() { ... } because the #[cfg(test)]
mod my_tests; In this case the sg won't skip I think it may be good idea to add this feature to sg. I will see if I can spare some time to implement this. |
Beta Was this translation helpful? Give feedback.
-
Hi, this looks like a great project. I was wondering whether any tools exist that can restrict searches in Rust code to test vs non-test code (i.e. according to
#[cfg(test)]
), and came across this project. I haven't looked into tree-sitter yet -- is that something that could be done in this project in principle?Beta Was this translation helpful? Give feedback.
All reactions