Skip to content

Commit b23daf0

Browse files
author
Mathieu Grzybek
committed
[makefile] split pre-commit target and simplify
1 parent aec09bc commit b23daf0

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

Makefile

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,19 @@ help:
55
| expand -t20 \
66
| sort
77

8+
.PHONY: dev-prepare # Install go tools and pre-commit hooks
9+
dev-prepare:
10+
go get github.com/securego/gosec/v2/cmd/gosec
11+
go get github.com/mgechev/revive
12+
go get golang.org/x/lint/golint
13+
#go get github.com/go-critic/go-critic/cmd/gocritic
14+
#go get github.com/akrennmair/go-imports
15+
#go get github.com/golangci/golangci-lint/cmd/golangci-lint
16+
17+
pre-commit install
18+
819
.PHONY: pre-commit # Run pre-commit compliance tests
920
pre-commit:
10-
go get github.com/golangci/golangci-lint/cmd/[email protected]
11-
pre-commit install
1221
pre-commit run --all-files
1322

1423
.PHONY: test # Run go test
@@ -19,5 +28,5 @@ onyxiactl: test
1928
go build -o onyxyactl main.go
2029

2130
.PHONY: all # lint, test and build
22-
all: pre-commit test onyxiactl
31+
all: onyxiactl
2332
@echo

0 commit comments

Comments
 (0)