diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 59cc7f7..e2eb353 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -37,6 +37,9 @@ jobs: - name: Rustdoc run: cargo doc --workspace --no-deps + - name: Unused dependencies + uses: bnjbvr/cargo-machete@v0.7.0 + - name: Typos uses: crate-ci/typos@v1.26.0 diff --git a/contrib/pre-commit b/contrib/pre-commit index da74696..fcc6da9 100755 --- a/contrib/pre-commit +++ b/contrib/pre-commit @@ -1,5 +1,9 @@ #!/usr/bin/env bash set -euo pipefail -typos cargo fmt -- --check fd -e nix | xargs nixfmt --check +if ! out="$(cargo machete 2>/dev/null)"; then + echo "$out" + exit 1 +fi +typos