Skip to content

Instantly share code, notes, and snippets.

@matteosister
Created June 15, 2016 21:03
Show Gist options
  • Save matteosister/8b45ced706386a05f22ff2436cdac262 to your computer and use it in GitHub Desktop.
Save matteosister/8b45ced706386a05f22ff2436cdac262 to your computer and use it in GitHub Desktop.
pre-commit hook for elixir
#!/bin/sh
# credo checks before commit
mix credo
CREDO_RES=$?
if [ $CREDO_RES -ne 0 ]
then
exit $CREDO_RES
fi
# tests
mix test
TEST_RES=$?
if [ $TEST_RES -ne 0 ]
then
exit $TEST_RES
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment