add git pre-commit hooks

This commit is contained in:
2025-07-02 04:14:53 -04:00
parent 585f04c745
commit cd43b3b853
2 changed files with 19 additions and 0 deletions

11
.githooks/pre-commit Executable file
View 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."

View File

@ -482,6 +482,14 @@ require "dep" {
- Lazy loading nvim-cmp doesn't work as the external sources don't get reconized
by nvim-cmp when it's loaded.
## Contributing
When contributing you may choose to run tests before commiting changes, if that
is so you may choose to run the following:
```sh
git config core.hooksPath .githooks
```
## License
dep is licensed under the [MIT License](LICENSE).