Skip to content

Instantly share code, notes, and snippets.

@eighty4
Created February 25, 2023 21:27
Show Gist options
  • Save eighty4/76d66111331af8de1334590f203382b3 to your computer and use it in GitHub Desktop.
Save eighty4/76d66111331af8de1334590f203382b3 to your computer and use it in GitHub Desktop.
An appropriate pre-push Git hook for Flutter projects
#!/bin/sh
set -e
cargo test
cargo clippy -- -D warnings
cargo fmt -v
git diff --exit-code
@eighty4
Copy link
Author

eighty4 commented Feb 25, 2023

cd rust-crate
curl https://gist.githubusercontent.com/eighty4/76d66111331af8de1334590f203382b3/raw/rust-git-hook.sh -o .git/hooks/pre-push
chmod +x .git/hooks/pre-push

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment