github.com/zmap/zlint@v1.1.0/makefile (about) 1 SHELL := /bin/bash 2 # Number of linting Go routines to use in integration tests 3 PARALLELISM := 5 4 # Additional integration test flags. Example usage: 5 # make integration PARALLELISM=99 INT_FLAGS="-fingerprintSummary -forceDownload" 6 # make integration INT_FLAGS="-overwriteExpected -config custom.config.json" 7 # make integration INT_FLAGS="-fingerprintSummary -lintSummary -fingerprintFilter='^[ea]' -lintFilter='^w_ext_cert_policy_explicit_text_not_utf8' -config small.config.json" 8 # make integration INT_FLAGS="-lintSummary -fingerprintSummary -lintFilter='^e_' -config small.config.json" 9 INT_FLAGS := 10 11 CMDS = zlint zlint-gtld-update 12 CMD_PREFIX = ./cmd/ 13 GO_ENV = GO111MODULE="on" GOFLAGS="-mod=vendor" 14 BUILD = $(GO_ENV) go build 15 TEST = $(GO_ENV) GORACE=halt_on_error=1 go test -race 16 INT_TEST = $(GO_ENV) go test -v -tags integration -timeout 20m ./integration/... -parallelism $(PARALLELISM) $(INT_FLAGS) 17 18 all: $(CMDS) 19 20 zlint: 21 $(BUILD) $(CMD_PREFIX)$(@) 22 23 zlint-gtld-update: 24 $(BUILD) $(CMD_PREFIX)$(@) 25 26 clean: 27 rm -f $(CMDS) 28 29 test: 30 $(TEST) ./... 31 32 integration: 33 $(INT_TEST) 34 35 format-check: 36 diff <(find . -name '*.go' -not -path './vendor/*' -print | xargs -n1 gofmt -l) <(printf "") 37 38 .PHONY: clean zlint zlint-gtld-update test integration format-check