-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
27 lines (21 loc) · 654 Bytes
/
Makefile
File metadata and controls
27 lines (21 loc) · 654 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
SHELL := bash
.PHONY: run
run:
CGO_ENABLED=0 go build -o varnishlog-parser cmd/server/varnishlog-parser.go
./varnishlog-parser --port=8080
.PHONY: test
test:
@go test -v -timeout=5s -vet=all -count=1 ./...
.PHONY: fmt
fmt:
@goimports -local $(shell go list -m) -w .
@gofumpt -l -w .
.PHONY: static-check
static-check:
golangci-lint run
.PHONY: ensure-spdx
ensure-spdx:
find . -type f -name "*.go" -exec sh -c 'head -1 {} | grep -q SPDX || echo "Missing SPDX on file {}"' \;
.PHONY: generate-chroma-style
generate-chroma-style:
go run cmd/chroma/generate-style.go > /tmp/chroma-style.css && mv /tmp/chroma-style.css assets/css/99_chroma.css