-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
35 lines (26 loc) · 797 Bytes
/
Makefile
File metadata and controls
35 lines (26 loc) · 797 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
31
32
33
34
35
GO_FILES=$(shell find . \( -path "./.go_pkg_cache" -o -path "./data" \) -prune -o -name "*.go" -print)
.PHONY: install_lint fmt format lint start_infra stop_infra help
install_lint:
go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.64.6
#? fmt: Ensure consistent code formatting.
fmt: format
format:
gofmt -s -w ${GO_FILES}
#? lint: Run pre-selected linters.
lint:
golangci-lint run ./... --exclude-dirs database
start_infra:
docker compose up -d --remove-orphans
stop_infra:
docker compose down
#? test: Run the tests.
test:
go test -v ./internal/... ./cmd/...
#? help: Get more info on make commands.
help: Makefile
@echo ''
@echo 'Usage:'
@echo ' make [target]'
@echo ''
@echo 'Targets:'
@sed -n 's/^#?//p' $< | column -t -s ':' | sort | sed -e 's/^/ /'