Mark test source files with a green color #10808
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR improves how the plugin marks test source files:
tests
andbenches
directories as test files, which means that they will be correctly filtered as tests e.g. inFind in Files -> Scope -> Project Test Files
.Find in Usages
etc. lists.TODO/questions:
getTestSourceFolders
approach seems that it could be slow, should I cache it or something?Find in XXX
that are located in Rust files that are not undertests
(like#[cfg(test)] mod tests { ... }
. Sadly, the platform only passes the file to the extension point, not the actualUsage
instance, so we can't easily find if a specific usage if a test usage. I think that we might be able to solve this by creating some synthetic file for test usages? But it sounds like a horrible hack.Related issue: #4436
changelog: Mark test source files with a green color in project view and various file lists (like Find in Path).