API / Makefile
sshinmen's picture
Update HF Spaces deployment with latest changes
2e6b65c
Raw
History Blame Contribute Delete
503 Bytes
GOPATH=$(shell go env GOPATH)
GOLANGCI_LINT=$(GOPATH)/bin/golangci-lint
.PHONY: lint lint-fix lint-install lint-precommit
lint-install:
go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest
lint:
$(GOLANGCI_LINT) run ./...
lint-fix:
$(GOLANGCI_LINT) run --fix ./...
# Pre-commit hook
lint-precommit:
@echo "#!/bin/sh" > .git/hooks/pre-commit
@echo '$(GOLANGCI_LINT) run --fast ./...' >> .git/hooks/pre-commit
@chmod +x .git/hooks/pre-commit
@echo "Pre-commit hook installed"