jondot / jondot/xtaskops

The coverage task should allow excludes (line and start/end) that grcov allows

Open
#7 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Rust
Stars
35
Forks
11
PR merge metrics
No merged PRs in 30d

Description

### Suggestion / Feature Request

The coverage task can be enhanced to specify exclude expressions as arguments to the grcov command.

Include this as a feature so that people using the crate do not have the functionality change, unless they specifically enable it.

This would allow having markers to mark lines as never intending to have test code

```
pub fn do_something(data : SomeData) {
if let Some(x) = data.x {
// Normal code
} else {
panic!("This should never happen"); // GRCOV_EXCL_LINE
}
}

```

Currently there is no --excl-line, --excl-start, or --excl-stop arguments to the grcov command line. This feature would add those arguments when doing coverage if the new feature is enabled.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.