-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathMakefile
More file actions
30 lines (23 loc) · 820 Bytes
/
Makefile
File metadata and controls
30 lines (23 loc) · 820 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.PHONY: gomods
gomods: ## Install gomods
go install github.com/jmank88/gomods@v0.1.3
.PHONY: gomodtidy
gomodtidy: gomods
gomods tidy
.PHONY: mockery
mockery: $(mockery) ## Install mockery.
go install github.com/vektra/mockery/v2@v2.46.3
.PHONY: generate
generate: mockery
mockery
.PHONY: rm-mocked
rm-mocked:
grep -rl "^// Code generated by mockery" | grep .go$ | xargs -r rm
.PHONY: lint-workspace lint
GOLANGCI_LINT_VERSION := 1.62.2
GOLANGCI_LINT_COMMON_OPTS := --max-issues-per-linter 0 --max-same-issues 0
GOLANGCI_LINT_DIRECTORY := ./golangci-lint
lint-workspace:
@./script/lint.sh $(GOLANGCI_LINT_VERSION) "$(GOLANGCI_LINT_COMMON_OPTS)" $(GOLANGCI_LINT_DIRECTORY)
lint:
@./script/lint.sh $(GOLANGCI_LINT_VERSION) "$(GOLANGCI_LINT_COMMON_OPTS)" $(GOLANGCI_LINT_DIRECTORY) "--new-from-rev=origin/main"