Skip to content

Commit 49dd82c

Browse files
committed
CI/CD - Git Hooks
1 parent 8dd60ed commit 49dd82c

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

.githooks/pre-commit

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/usr/bin/env bash
2+
3+
goimports -l -w . # includes go fmt
4+
golangci-lint run # includes golint, go vet

install-git-hook.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
chmod ug+x ./.githooks/*
2+
git config core.hooksPath ./.githooks

0 commit comments

Comments
 (0)