Skip to content

v0.6.0

Choose a tag to compare

@Kuenlun Kuenlun released this 14 May 06:01
· 36 commits to master since this release
d0db830

Added

  • Run cargo doc --no-deps --workspace --all-features with RUSTDOCFLAGS=-D warnings as a new doc check, skippable via --skip doc (#27)
  • Run cargo machete as a new check for unused dependencies, skippable via --skip machete (#27)
  • Run cargo audit as a new check against the RustSec advisory database, skippable via --skip audit (#27)
  • Scan source files in-process for byte-equality against a configured header template, with default globs src/**/*.rs, tests/**/*.rs, examples/**/*.rs, benches/**/*.rs. Skip any file whose first five lines contain @generated, dedupe overlapping glob matches, and canonicalize paths so the configured header file does not flag itself. Skippable via --skip license (#27)
  • Parse cargo llvm-cov report --json --summary-only --branch into per-metric thresholds for functions, lines, regions, and branches (default 100 each), using integer arithmetic so the gate is exact at the equality boundary. Treat count == 0 on an individual metric as vacuously satisfied and reject reports where every metric is zero. The coverage phase runs only when both compile and test pass, and is skippable via --skip coverage (implied by --skip test) (#27)
  • Auto-detect cargo-nextest at startup and dispatch the test phase through cargo test, cargo nextest run, cargo llvm-cov, or cargo llvm-cov nextest depending on the detected toolchain. Append --no-tests=pass to every nextest invocation so empty test sets keep parity with cargo test from nextest 0.9.85 onward (#27)
  • Load configuration from [workspace.metadata.lockpick] (preferred) or [package.metadata.lockpick] with kebab-case keys license-header, license-header-globs, and a nested coverage table. Warn when only the package section is set in a multi-crate workspace (#27)
  • Print a banner of every planned cargo invocation up front under --verbose (#27)
  • End every run with an OK: N/N checks passed (green) or Failed: K/N (labels) (red) summary footer (#27)
  • Print a --skip test implies coverage will be skipped notice that stays visible even without --verbose (#27)
  • Scrub CARGO_PKG_*, CARGO_BIN_*, CARGO_CRATE_*, CARGO_MANIFEST_DIR, CARGO_MANIFEST_PATH, and CARGO_PRIMARY_PACKAGE from every spawned cargo invocation, and detect optional cargo subcommands by scanning PATH for the cargo-<sub> binary instead of spawning cargo <sub> --version, so children launched under cargo run no longer inherit the parent crate's context. In particular this fixes cargo-machete's positional-paths fallback under a leaked CARGO_PKG_NAME (#27)

Changed

  • BREAKING: Run coverage by default. Configure per-metric thresholds (default 100 for functions, lines, regions, and branches) through [*.metadata.lockpick.coverage], and opt out with --skip coverage (implied by --skip test) (#27)
  • BREAKING: Demote --verbose (-v) from a repeat-count u8 to a plain bool, so -vv, -vvv, and -vvvv are no longer accepted (#27)
  • BREAKING: Exit with code 3 and an install hint when a required cargo subcommand (cargo-llvm-cov, cargo-machete, cargo-audit, cargo-nextest) is missing, code 1 when any check fails, and code 2 on usage errors (#27)
  • BREAKING: Tighten the clippy check to enable the pedantic, nursery, and cargo lint groups with -D warnings (#27)
  • BREAKING: Pass --all to cargo fmt --check so every workspace member is validated (#27)
  • Finish each parallel check's spinner from inside its worker thread so PASS/FAIL marks land progressively rather than all together once the slowest task completes (#27)
  • Propagate panicking checks via std::panic::resume_unwind instead of masking them as Fail with empty output (#27)

Removed

  • BREAKING: Drop the --coverage/-c opt-in flag and the --min-coverage percentage threshold. Coverage now runs by default and is configured through [*.metadata.lockpick.coverage] (#27)