Skip to content

Instantly share code, notes, and snippets.

@jechol
Created April 25, 2018 07:10
Show Gist options
  • Save jechol/caa97b71cf894c3b072cf6dcd7754bba to your computer and use it in GitHub Desktop.
Save jechol/caa97b71cf894c3b072cf6dcd7754bba to your computer and use it in GitHub Desktop.
#!/bin/sh
cd `git rev-parse --show-toplevel`
mix format --check-formatted
if [ $? == 1 ]; then
echo "[ERROR!!!] Commit failed because you have format issues..."
echo "[SO WHAT?] Please run mix format and git add/commit again dude. ^^"
exit 1
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment