tarp

Crates.iotarp
lib.rstarp
version0.10.1
sourcesrc
created_at2020-01-13 17:47:34.282929
updated_at2020-01-14 08:38:15.698695
descriptionTarp is a code coverage tool
homepage
repositoryhttps://github.com/apibillme/tarp
max_upload_size
id198138
size258,245
Bevan Hunt (bevanhunt)

documentation

README

Tarp - Code Coverage Tool

crates.io

Purpose

Provide a Rust Code Coverage tool that works with Snap and Travis CI

Features

  • Line coverage
  • Uploading coverage to https://coveralls.io or https://codecov.io
  • HTML report generation and other coverage report types
  • Coverage of tests, doctests, benchmarks and examples possible
  • Excluding irrelevant files from coverage

Ignoring code in files

Tarpaulin now allows you to ignore modules or functions using config attributes. Below is an example of ignoring the main function in a project:

#[cfg_attr(tarpaulin, skip)]
fn main() {
    println!("I won't be included in results");
}

Travis CI

language: rust
sudo: required
dist: bionic
addons:
    apt:
        packages:
            - libssl-dev
cache: cargo
rust:
  - stable
  - beta
  - nightly
matrix:
  allow_failures:
    - rust: nightly

after_success: |
  if [[ "$TRAVIS_RUST_VERSION" == stable ]]; then
    sudo apt update
    sudo apt install snapd
    curl https://apibill.me/tarp/tarp_0.10.0_amd64.snap --output tarp_0.10.0_amd64.snap
    sudo snap install tarp_0.10.0_amd64.snap --classic --dangerous
    sudo ln -s /home/travis/.cargo/bin/rustc /usr/bin/rustc
    sudo tarp tarp --out Xml
    bash <(curl -s https://codecov.io/bash)
  fi
Commit count: 810

cargo fmt