#!/usr/bin/env sh
set -eu

if [ "${SKIP_PRE_PUSH:-}" = "1" ]; then
  echo "pre-push: SKIP_PRE_PUSH=1 set; skipping checks."
  exit 0
fi

echo "pre-push: running cargo check with warnings denied (tests, all features)"
RUSTFLAGS="-D warnings" cargo check --tests --all-features
