rust-lang / rust-lang/rust-analyzer

Support for code coverage through -Z instrument-coverage

Open
#8,881 4 comments 9 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

E-hard fun S-actionable
Dominant language
Rust
Stars
16.9k
Forks
2.2k
Avg merge
1d 12h
Merged PRs (30d)
72

Description

Hello,

Since source based code coverage is available in nightly , would that make sense to have support for dumping and showing coverage results at IDE level with rust-analyser ?

This is also mentioned in #8420 but the purpose of this feature request is to specifically focus on code coverage computation and rendering in the IDE with gutters and so independently from live/incremental testing.

For VSCode the MVP for me would be a Coverage lens that would run a given test and show related code coverage highlighting uncovered lines with a color (red by default).

Does that makes sens ?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing Rust's nightly instrument-coverage documentation and the related issue #8420. Define how rust-analyzer and the VS Code integration would run a test, collect coverage, and render uncovered lines in a Coverage lens; done means a documented, working MVP for that flow.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
devtools, testing-qa
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.