aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile18
1 files changed, 18 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..5cb209c
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,18 @@
+COVER_OUT:=cover.out
+COVER_HTML:=cover.html
+
+.PHONY: test
+test:
+ CGO_ENABLED=1 go test -failfast -timeout=5m -race -coverprofile=$(COVER_OUT) ./...
+ go tool cover -html=$(COVER_OUT) -o $(COVER_HTML)
+
+.PHONY: lint
+lint:
+ -fieldalignment ./...
+ -shadow ./...
+ -golangci-lint run \
+ --presets bugs,metalinter,performance,unused \
+ --disable exhaustive \
+ --disable musttag \
+ --disable bodyclose \
+ ./...