ZIm/script/clippy
Cole Miller d25da9728b
Run additional checks from script/clippy if local (#29768)
Should cut down on the number of CI cycles if you're forgetful like I
am!

Release Notes:

- N/A
2025-05-02 01:26:12 +00:00

19 lines
480 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-machete >/dev/null 2>&1 || exit 0
cargo machete
which typos >/dev/null 2>&1 || exit 0
typos --config typos.toml
fi