Explorar el Código

Add pre-commit hooks

Andy Baugh hace 3 meses
padre
commit
63e5becb01
Se han modificado 2 ficheros con 7 adiciones y 1 borrados
  1. 4 1
      Makefile
  2. 3 0
      githooks/pre-commit

+ 4 - 1
Makefile

@@ -1,3 +1,6 @@
+install-githooks:
+	install githooks/* .git/hooks/
+
 test: compilecheck
 	prove -mv t/*.t
 
@@ -9,4 +12,4 @@ tidy:
 	$(foreach FILE,$(FILES2CHECK),perltidy -b $(FILE) &&) /bin/true
 	perltidy -b t/*.t
 
-.PHONY: compilecheck test tidy
+.PHONY: compilecheck test tidy install-githooks

+ 3 - 0
githooks/pre-commit

@@ -0,0 +1,3 @@
+#!/bin/sh
+make test
+make tidy