Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/taiki-e/coverage-helper
Helper for https://github.com/taiki-e/cargo-llvm-cov/issues/123.
https://github.com/taiki-e/coverage-helper
coverage rust
Last synced: 19 days ago
JSON representation
Helper for https://github.com/taiki-e/cargo-llvm-cov/issues/123.
- Host: GitHub
- URL: https://github.com/taiki-e/coverage-helper
- Owner: taiki-e
- License: apache-2.0
- Created: 2022-05-29T02:44:29.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-10-20T18:35:16.000Z (25 days ago)
- Last Synced: 2024-10-20T23:02:18.641Z (25 days ago)
- Topics: coverage, rust
- Language: Shell
- Homepage:
- Size: 126 KB
- Stars: 10
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE-APACHE
Awesome Lists containing this project
README
# coverage-helper
[![crates.io](https://img.shields.io/crates/v/coverage-helper?style=flat-square&logo=rust)](https://crates.io/crates/coverage-helper)
[![docs.rs](https://img.shields.io/badge/docs.rs-coverage--helper-blue?style=flat-square&logo=docs.rs)](https://docs.rs/coverage-helper)
[![license](https://img.shields.io/badge/license-Apache--2.0_OR_MIT-blue?style=flat-square)](#license)
[![msrv](https://img.shields.io/badge/msrv-1.38-blue?style=flat-square&logo=rust)](https://www.rust-lang.org)
[![github actions](https://img.shields.io/github/actions/workflow/status/taiki-e/coverage-helper/ci.yml?branch=main&style=flat-square&logo=github)](https://github.com/taiki-e/coverage-helper/actions)Helper for .
**Note:** coverage-helper 0.2 supports `#[coverage(off)]`.
See coverage-helper 0.1 for versions that support `#[no_coverage]`.## Usage
Add this to your `Cargo.toml`:
```toml
[dev-dependencies]
coverage-helper = "0.1"
```And add this to your crate root (`lib.rs` or `main.rs`):
```rust
#![cfg_attr(all(coverage_nightly, test), feature(coverage_attribute))]
```## Examples
```rust
use coverage_helper::test;#[test]
fn my_test() {
// ...
}
```Expanded to:
```rust
#[cfg_attr(all(coverage_nightly, test), coverage(off))]
#[::core::prelude::v1::test]
fn my_test() {
// ...
}
```## License
Licensed under either of [Apache License, Version 2.0](LICENSE-APACHE) or
[MIT license](LICENSE-MIT) at your option.Unless you explicitly state otherwise, any contribution intentionally submitted
for inclusion in the work by you, as defined in the Apache-2.0 license, shall
be dual licensed as above, without any additional terms or conditions.