id-validator/Makefile

25 lines
492 B
Makefile
Raw Permalink Normal View History

2021-01-12 16:09:37 +08:00
# note: call scripts from /scripts
2021-01-19 17:08:30 +08:00
GOCMD=GO111MODULE=on go
2021-01-25 17:06:49 +08:00
LOCALCMD=/usr/local
2021-01-19 17:08:30 +08:00
linters-install:
@golangci-lint --version >/dev/null 2>&1 || { \
echo "installing linting tools..."; \
curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh| sh -s v1.21.0; \
}
lint: linters-install
2021-01-25 17:06:49 +08:00
$(LOCALCMD)/bin/golangci-lint run
fmt:
$(GOCMD) fmt ./...
vet:
$(GOCMD) vet ./.
2021-01-19 17:08:30 +08:00
test:
$(GOCMD) test -cover -race ./...
bench:
$(GOCMD) test -bench=. -benchmem ./...