-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
47 lines (36 loc) · 925 Bytes
/
Makefile
File metadata and controls
47 lines (36 loc) · 925 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
36
37
38
39
40
41
42
43
44
45
46
47
BUILD_DIR ?= build
SRC_FILES := $(shell find . -name "*.go")
all: build lint race cover
.PHONY: all
build: $(BUILD_DIR)/opml2json $(BUILD_DIR)/roundtrip
$(BUILD_DIR)/%: $(SRC_FILES)
go build -trimpath -o $@ ./cmd/$*
lint:
golangci-lint run ./...
.PHONY: lint
cover:
go test -coverprofile=coverage.out ./...
.PHONY: cover
coverhtml: cover
go tool cover -html=coverage.out
.PHONY: coverhtml
race:
go test -race ./...
.PHONY: race
test:
go test ./...
.PHONY: test
# Install development tools
dev-install-tools:
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.61.0
go install github.com/hashicorp/copywrite@latest
go install golang.org/x/vuln/cmd/govulncheck@latest
.PHONY: dev-install-tools
# Licence headers
copywrite:
copywrite headers
.PHONY: copywrite
# Vulnerability check
vulncheck:
govulncheck -C . ./...
.PHONY: vulncheck