Skip to content

Instantly share code, notes, and snippets.

@mrkaspa
Forked from matteosister/pre-commit
Created September 16, 2016 21:59
Show Gist options
  • Save mrkaspa/49ee984068745a45f1daa9717e5c1e2c to your computer and use it in GitHub Desktop.
Save mrkaspa/49ee984068745a45f1daa9717e5c1e2c 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