-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
31 lines (25 loc) · 1009 Bytes
/
Makefile
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
# Disable all the default make stuff
MAKEFLAGS += --no-builtin-rules
.SUFFIXES:
## Display a list of the documented make targets
.PHONY: help
help:
@echo Documented Make targets:
@perl -e 'undef $$/; while (<>) { while ($$_ =~ /## (.*?)(?:\n# .*)*\n.PHONY:\s+(\S+).*/mg) { printf "\033[36m%-30s\033[0m %s\n", $$2, $$1 } }' $(MAKEFILE_LIST) | sort
# ------------------------------------------------------------------------------
# NON-PHONY TARGETS
# ------------------------------------------------------------------------------
.PHONY: .FORCE
.FORCE:
# ------------------------------------------------------------------------------
# PHONY TARGETS
# ------------------------------------------------------------------------------
## Execute Go tests with gotestsum (go install gotest.tools/gotestsum@latest)
.PHONY: test
test:
gotestsum --format testname -- -race
## Lint Go code with golangci-lint (install this if you don't have it)
.PHONY: lint
lint:
go vet ./...
golangci-lint run --show-stats