-
Notifications
You must be signed in to change notification settings - Fork 13
/
Makefile
44 lines (34 loc) · 1.23 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
39
40
41
42
43
44
.PHONY: help
help: ## Show this help
@awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z_-]+:.*?## / {sub("\\\\n",sprintf("\n%22c"," "), $$2);printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST)
.PHONY: gomod_tidy
gomod_tidy: ## Update Go mod dependencies
go mod tidy
.PHONY: gofmt
gofmt: ## Run Go formatting checks
go fmt -x ./...
.PHONY: build
build: ## Build executable without extension (Unix)
go build -o alizer
.PHONY: buildWin
buildWin: ## Build executable with Windows .exe extension
go build -o alizer.exe
.PHONY: test
test: ## Run unit tests with coverage
go test -coverprofile cover.out -v ./...
.PHONY: check_registry
check_registry: ## Run registry checks
./test/check_registry/check_registry.sh
.PHONY: gosec_install
gosec_install: ## Install gosec utility
go install github.com/securego/gosec/v2/cmd/[email protected]
.PHONY: gosec
gosec: ## Run go security checks
./scripts/run_gosec.sh
.PHONY: lint
lint: ## Run golangci-lint linter tool
golangci-lint run ./... --timeout 15m
.PHONY: lint_install
lint_install: ## Install golangci-lint linter tool
@# TODO(rm3l): recent versions of golangci-lint require Go >= 1.20. Update when we start using Go 1.20+
go install github.com/golangci/golangci-lint/cmd/[email protected]