File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- .PHONY : build test test-unit e2e lint install clean
1+ .PHONY : build test test-unit e2e lint install clean tools hooks
22
33VERSION ?= $(shell git describe --tags --always --dirty 2>/dev/null || echo "dev")
44LDFLAGS := -ldflags "-X github.com/boneskull/gh-stack/cmd.version=$(VERSION ) "
@@ -37,3 +37,8 @@ gh-install: build
3737# Install development tools
3838tools :
3939 go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v2.8.0
40+ go install github.com/evilmartians/lefthook/v2@latest
41+
42+ # Install git hooks via lefthook
43+ hooks :
44+ lefthook install
Original file line number Diff line number Diff line change 1+ # https://github.com/evilmartians/lefthook
2+
3+ pre-commit :
4+ parallel : true
5+ jobs :
6+ - name : lint
7+ glob : ' *.go'
8+ run : golangci-lint run --new-from-rev=HEAD~ ./...
You can’t perform that action at this time.
0 commit comments