rust-lang / rust-lang/rust-analyzer
create file assist: wrong file in case of intergration/functional test
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 16.9k
- Forks
- 2.2k
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 72
Description
rust-analyzer version: (eg. output of "Rust Analyzer: Show RA Version" command)
rust-analyzer 0f8c96c92 2022-01-10 dev
rustc version: (eg. output of rustc -V)
rustc 1.58.0-beta.3
If inside crate/tests/dummy_test.rs you write:
mod submodule;
and ask "Assistant" to create file, it creates:
crate/tests/submodule.rs.
Which is interpreted by cargo/rust as another test not submodule.
In this case "assistant" should create "old fashion module": `crate/tests/submodule/mod.rs".
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the Assistant request from crate/tests/dummy_test.rs, where mod submodule; currently leads to crate/tests/submodule.rs. Trace the create-file Assistant entry point and verify that the completed behavior creates crate/tests/submodule/mod.rs without treating it as another test.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100