Created
June 15, 2016 21:03
-
-
Save matteosister/8b45ced706386a05f22ff2436cdac262 to your computer and use it in GitHub Desktop.
pre-commit hook for elixir
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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