-
-
Save mrkaspa/49ee984068745a45f1daa9717e5c1e2c 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