#!/usr/bin/env bash # The workspace lint run, in the one spelling everything uses. # # Cargo fingerprints a check by the flags it was given, so `cargo clippy` and # `cargo clippy -- -D warnings` are two different cached results over the same # source. Alternating between them re-checks every workspace crate, which on # this tree is around a minute each way. Running this instead of a hand-rolled # clippy keeps one fingerprint, and a check that nothing has changed then costs # under a second. # # The pre-commit hook runs this same script, so the two cannot drift. set -euo pipefail cd "$(dirname "$0")/.." exec cargo clippy --workspace --all-targets --all-features "$@" -- -D warnings