forked from ebhomengo/niki
1
0
Fork 0
niki/Makefile

19 lines
601 B
Makefile
Raw Normal View History

2023-12-20 15:39:25 +00:00
// TODO: add commands for build and run in dev/produciton mode
ROOT=$(realpath $(dir $(lastword $(MAKEFILE_LIST))))
lint:
which golangci-lint || (go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.54.0)
golangci-lint run --config=$(ROOT)/.golangci.yml $(ROOT)/...
test:
go test -v ./...
format:
@which gofumpt || (go install mvdan.cc/gofumpt@latest)
@gofumpt -l -w $(ROOT)
@which gci || (go install github.com/daixiang0/gci@latest)
@gci write $(ROOT)
@which golangci-lint || (go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.54.0)
@golangci-lint run --fix