rust-lang / rls

Repository for the Rust Language Server (aka RLS)
Other
3.51k stars 257 forks source link

Update regex use to match test for external librairies #1740

Closed arthurlm closed 2 years ago

arthurlm commented 3 years ago

Make test regex a little bit more permissive. This will allow external libs that have special test macro to be recognize as valid test case.

For example, following macros will be recognized as valid test case:

#[test]
#[tokio::test]
#[async_std::test]
#[actix_web::test]
#[actix_rt::test]
#[actix_web::rt::test]

Issue was at beginning reported in vscode-rust repo here and author switch from rls to rust-analyser.

Looking at rust-analyser, everything that has test in function attributes is recognized as a test (see code here). Running test or not is a choice left to user, even if it does not work perfectly.

saeedtabrizi commented 3 years ago

Is there any update here ? I have same issue .

Xanewok commented 2 years ago

This looks useful, thanks a lot.