17 lines
236 B
Makefile
17 lines
236 B
Makefile
.PHONY: test lint check-fmt fmt
|
|
|
|
test: lint check-fmt
|
|
go test -v ./...
|
|
|
|
lint:
|
|
golangci-lint run
|
|
|
|
check-fmt:
|
|
@if [ -n "$$(gofmt -l .)" ]; then \
|
|
echo "Go code is not formatted:"; \
|
|
gofmt -l .; \
|
|
exit 1; \
|
|
fi
|
|
|
|
fmt:
|
|
go fmt ./...
|