Last active
October 23, 2022 07:48
-
-
Save IvanIvanoff/7586e7c1b32f44b301709a7bb3696279 to your computer and use it in GitHub Desktop.
pre-commit hook for checking mix formatting
This file contains hidden or 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/bash | |
cd `git rev-parse --show-toplevel` | |
echo "Running pre-commit hook: Check elixir formatting with mix format" | |
mix format --check-formatted | |
if [ $? == 1 ]; then | |
echo "mix format --check-formatted found formatting issues." | |
exit 1 | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment