forked from zmap/zlint
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmakefile
38 lines (29 loc) · 1.15 KB
/
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
32
33
34
35
36
37
38
SHELL := /bin/bash
# Number of linting Go routines to use in integration tests
PARALLELISM := 5
# Additional integration test flags. Example usage:
# make integration PARALLELISM=99 INT_FLAGS="-fingerprintSummary -forceDownload"
# make integration INT_FLAGS="-overwriteExpected -config custom.config.json"
# make integration INT_FLAGS="-fingerprintSummary -lintSummary -fingerprintFilter='^[ea]' -lintFilter='^w_ext_cert_policy_explicit_text_not_utf8' -config small.config.json"
# make integration INT_FLAGS="-lintSummary -fingerprintSummary -lintFilter='^e_' -config small.config.json"
INT_FLAGS :=
CMDS = zlint zlint-gtld-update
CMD_PREFIX = ./cmd/
GO_ENV = GO111MODULE="on" GOFLAGS="-mod=vendor"
BUILD = $(GO_ENV) go build
TEST = $(GO_ENV) GORACE=halt_on_error=1 go test -race
INT_TEST = $(GO_ENV) go test -v -tags integration -timeout 20m ./integration/... -parallelism $(PARALLELISM) $(INT_FLAGS)
all: $(CMDS)
zlint:
$(BUILD) $(CMD_PREFIX)$(@)
zlint-gtld-update:
$(BUILD) $(CMD_PREFIX)$(@)
clean:
rm -f $(CMDS)
test:
$(TEST) ./...
integration:
$(INT_TEST)
code-lint:
golangci-lint run
.PHONY: clean zlint zlint-gtld-update test integration code-lint