Skip to content

Find all references, exclusing test configuration #14530

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
chamons opened this issue Apr 7, 2023 · 7 comments · Fixed by #16441
Closed

Find all references, exclusing test configuration #14530

chamons opened this issue Apr 7, 2023 · 7 comments · Fixed by #16441
Assignees
Labels
A-config configuration A-ide general IDE features C-feature Category: feature request

Comments

@chamons
Copy link

chamons commented Apr 7, 2023

I often want to find the usages of a references, but for some APIs there can be many more usages in test code than elsewhere.

As rust's default is to place test code in the same file, it can be difficult to determine which usages are which without expanding each instance.

In C#, it is relatively simple to work around this by excluding folders or unload test projects.

Would it be possible to add either a new "Find all non-test references", or a project setting to exclude refernces in a test Cfg scope?

@chamons chamons added the C-feature Category: feature request label Apr 7, 2023
@chamons
Copy link
Author

chamons commented Apr 7, 2023

I have some interest in this and would be willing to spend some time implementing it if it's found acceptable.

@Veykril
Copy link
Member

Veykril commented Apr 7, 2023

We have something similar for imports already here

references_excludeImports: bool = "false",

So you can likely take inspiration from that to add another config but for test things (though I believe this will be trickier to do properly)

@lowr lowr added A-ide general IDE features A-config configuration labels Jul 31, 2023
@kurotych
Copy link

Hi, @chamons Did you have any chance to find a solution? I struggle with the same issue.

@Young-Flash
Copy link
Member

Young-Flash commented Jan 24, 2024

I'll try working on this

@rustbot claim

@chamons
Copy link
Author

chamons commented Jan 24, 2024

I have not found a solution nor time to work on this.

@chamons
Copy link
Author

chamons commented Jan 31, 2024

Thank you @Young-Flash for running this down!

I'm super excited for this. ❤️

@Young-Flash
Copy link
Member

you can try it out at the next nightly release and give some feedback :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-config configuration A-ide general IDE features C-feature Category: feature request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants