From cd43b3b8533a0e9a08306e73d2bc2b1e42e7f286 Mon Sep 17 00:00:00 2001 From: Squibid Date: Wed, 2 Jul 2025 04:14:53 -0400 Subject: [PATCH] add git pre-commit hooks --- .githooks/pre-commit | 11 +++++++++++ README.md | 8 ++++++++ 2 files changed, 19 insertions(+) create mode 100755 .githooks/pre-commit diff --git a/.githooks/pre-commit b/.githooks/pre-commit new file mode 100755 index 0000000..eb326ad --- /dev/null +++ b/.githooks/pre-commit @@ -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." diff --git a/README.md b/README.md index 54297d0..48e3938 100644 --- a/README.md +++ b/README.md @@ -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).