Developer Guide
Pre-commit checks
- Run tests
cargo test
- Run formatter
cargo fmt
- Check linter
cargo clippy --all-features --all-targets -- -D warnings
and if you want to automatically fix then runcargo clippy --fix
Coverage
Test coverage checks are performed in the pipeline. This is configured here: .github/workflows/coverage.yaml
To run these locally:
- Install coverage tool by running
cargo install cargo-llvm-cov
- Run
cargo llvm-cov --ignore-filename-regex '.*(tests).*|benches.rs|gencode|helpers.rs'
(you may be asked if you want to installllvm-tools-preview
, if so typeY
)