A small, idiomatic Rust password strength and policy library used as the Rust reference example for Coverage Tracker. It exists to give the Rust row in the coverage report generation guide a live, working reference, and to populate the demo dashboard with real trend data.
This is a demo/marketing repo, not a test suite for Coverage Tracker
itself. cargo-llvm-cov's stable-toolchain default emits line coverage
only — branch data requires the nightly toolchain and an unstable --branch
flag, which this repo deliberately doesn't take on — so unlike the other
example repos, this one won't show a branch coverage metric on the
dashboard (same situation as example-go).
src/strength.rs— heuristic password strength scoring from length and character-class variety.src/policy.rs— configurable pass/fail policy checks (min length, required character classes) plus human-readable descriptions.src/entropy.rs— a rough Shannon-entropy estimate and qualitative rating.src/blocklist.rs— a small common-password denylist shared by the above.- Each module has unit tests, but each also has a real function or two left
deliberately untested (
Strength's "Excellent" tier,require_specialpolicy checks, mostDisplay/description text), landing at ~77% line coverage. .github/workflows/coverage.yml— runs tests under cargo-llvm-cov, generates a Lizard complexity report, then reports both to the demo instance via thecoverage-trackerreporting Action.
cargo install cargo-llvm-cov
cargo llvm-cov --lcov --output-path lcov.info # writes lcov.info
python -m lizard src --xml > lizard-report.xml