#!/bin/bash # Create a symlink from `.git/hooks/pre-push` to this script to run the checks below # before pushing changes to github. This will avoid CI failures due to clippy # lints and formatting issues. echo "Checking Rust rules prior to push. To run this check by hand invoke 'scripts/pre-push'" set -ex cargo fmt --all -- --check cargo clippy --workspace -- -D warnings RUSTDOCFLAGS="-Dwarnings" cargo doc --workspace --no-deps