1 2 3 4 5 6 7 8 9
#!/bin/bash # Make sure each commit is linted # Install this script to `.git/hooks/pre-commit` set -xe cargo clippy --all-targets --all-features --fix --allow-dirty --allow-staged cargo fmt --all