Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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