Add git hooks

This commit is contained in:
Mark Haines 2017-02-02 18:28:35 +00:00
parent 254fe7b683
commit 0c5bf46382
2 changed files with 14 additions and 0 deletions

5
hooks/install.sh Executable file
View file

@ -0,0 +1,5 @@
#! /bin/bash
DOT_GIT="$(dirname $0)/../.git"
ln -s "../../hooks/pre-commit" "$DOT_GIT/hooks/pre-commit"

9
hooks/pre-commit Executable file
View file

@ -0,0 +1,9 @@
#! /bin/bash
set -eu
golint src/...
go fmt ./src/...
go tool vet --shadow ./src
gocyclo -over 12 src/
gb test