-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathMakefile
More file actions
33 lines (25 loc) · 826 Bytes
/
Copy pathMakefile
File metadata and controls
33 lines (25 loc) · 826 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
default: help
.PHONY: help
help: ## Show this help.
@fgrep -h "##" $(MAKEFILE_LIST) | fgrep -v fgrep | sed -e 's/:.*##/:##/' | awk -F':##' '{printf "%-12s %s\n",$$1, $$2}'
.PHONY: test
test: ## Run tests.
go test -v ./...
.PHONY: test-race
test-race: ## Run tests with the race detector.
go test -race ./...
.PHONY: test-cover
test-cover: ## Run tests with package coverage.
go test -cover ./...
.PHONY: test-fuzz-document
test-fuzz-document: ## Run document fuzz tests briefly.
go test -fuzz=FuzzPositionOffsetRoundTrip -fuzztime=30s ./document
.PHONY: lint_install
lint_install: ## Install golangci-lint
go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@latest
.PHONY: lint
lint: lint_install ## Run linting operations
golangci-lint run ./...
.PHONY: fmt
fmt: ## Format the code
@gofmt -w .