add git pre-commit hooks
This commit is contained in:
11
.githooks/pre-commit
Executable file
11
.githooks/pre-commit
Executable file
@ -0,0 +1,11 @@
|
||||
#!/bin/sh
|
||||
|
||||
echo "Running tests before commit..."
|
||||
|
||||
# run tests
|
||||
make test || {
|
||||
echo "Tests failed. Commit aborted."
|
||||
exit 1
|
||||
}
|
||||
|
||||
echo "Tests passed. Proceeding with commit."
|
Reference in New Issue
Block a user