zed/script/clippy
Neel 282f47a544
Switch from cargo-machete to cargo-shear (#62643)
This results in ~110 crates being removed, and some orphaned files also.

---

Release Notes:

- N/A

Signed-off-by: Neel <neel@zed.dev>
2026-08-20 10:08:48 +00:00

23 lines
627 B
Bash
Executable file

#!/usr/bin/env bash
set -euo pipefail
if [[ ! " $* " == *" -p "* && ! " $* " == *" --package "* ]]; then
set -- "$@" --workspace
fi
set -x
"${CARGO:-cargo}" clippy "$@" --release --all-targets --all-features -- --deny warnings
# If local, run other checks if we have the tools installed.
if [[ -z "${GITHUB_ACTIONS+x}" ]]; then
which cargo-shear >/dev/null 2>&1 || exit 0
cargo shear --locked --deny-warnings
which typos >/dev/null 2>&1 || exit 0
typos --config typos.toml
which buf >/dev/null 2>&1 || exit 0
buf lint crates/proto/proto
buf format --diff --exit-code crates/proto/proto
fi