Skip to content

Code coverage and metrics

Simon B edited this page Jan 21, 2019 · 4 revisions

Code coverage is a nice-to-have but due to rapid development, we've not yet had time to focus on this.

On the other hand, what gets measured, gets improved.

These are the tasks ahead:

  1. Make some CI pipeline that is triggered by pushes into the mimblewimble/grin#master branch, or perhaps time based trigger.
  2. Update the coverage badge in the grin README.md
  3. Copy out coverage numbers periodically here.

Historical code coverage numbers

Mainnet | 2019-01-21 | 69.87% coverage, 15834/22663 lines covered | Measured with cargo clean; cargo tarpaulin --all

Other code metrics

Complexity metrics?

Clippy warnings

Running cargo clippy -- -A clippy::precedence -A clippy::match_bool -A clippy::cast_lossless -A clippy::redundant_field_names -A clippy::trivially_copy_pass_by_ref -A clippy:clone_on_copy -A clippy::style is (soon) almost manageable. There are still a lot of easy PRs possible for making this better. Style-only code changes are important to make in small chunks to not overwhelm: reviewers, others people's PRs (better not change code style in files while someone else is working on them if at all possible), and to not risk causing some obscure bug that nobody knows where it could've come from.

Clone this wiki locally