clippy
1#!/usr/bin/env bash
2
3set -euo pipefail
4
5if [[ ! " $* " == *" -p "* && ! " $* " == *" --package "* ]]; then
6 set -- "$@" --workspace
7fi
8
9set -x
10"${CARGO:-cargo}" clippy "$@" --release --all-targets --all-features -- --deny warnings
11
12# If local, run other checks if we have the tools installed.
13if [[ -z "${GITHUB_ACTIONS+x}" ]]; then
14 which cargo-machete >/dev/null 2>&1 || exit 0
15 cargo machete
16
17 which typos >/dev/null 2>&1 || exit 0
18 typos --config typos.toml
19fi