This commit is contained in:
2025-11-02 10:17:49 +02:00
parent 8e017af3ed
commit d9a4bb7871

View File

@@ -55,30 +55,22 @@ pure-run:
exec ./$(BIN_DIR)/$(APP_NAME) exec ./$(BIN_DIR)/$(APP_NAME)
test: test:
@go test ./... | grep -v '^?' || true @cd src && go test ./... | grep -v '^?' || true
fmt: fmt:
@go fmt ./internal/./... @cd src && go fmt .
@go fmt ./cmd/./... @cd src && $(GOPATH)/bin/goimports -w .
@go fmt ./hooks/./...
@$(GOPATH)/bin/goimports -w ./internal/
@$(GOPATH)/bin/goimports -w ./cmd/
@$(GOPATH)/bin/goimports -w ./hooks/
vet: vet:
@go vet ./... @cd src && go vet ./...
lint:
@$(GOPATH)/bin/golangci-lint run
check: fmt vet lint test check: fmt vet lint test
lint:
licenses: @cd src && $(GOPATH)/bin/golangci-lint run ./...
@$(GOPATH)/bin/go-licenses save ./... --save_path=third_party/licenses --force @$(GOPATH)/bin/go-licenses save ./... --save_path=third_party/licenses --force
@echo "Licenses have been exported to third_party/licenses" @echo "Licenses have been exported to third_party/licenses"
clean: licenses:
@rm -rf bin @cd src && $(GOPATH)/bin/go-licenses save ./... --save_path=../third_party/licenses --force
@echo "Licenses have been exported to third_party/licenses"
help: help:
@echo "Available commands: $$(cat Makefile | grep -E '^[a-zA-Z_-]+:.*?' | grep -v -- '-setup:' | sed 's/:.*//g' | sort | uniq | tr '\n' ' ')" @echo "Available commands: $$(cat Makefile | grep -E '^[a-zA-Z_-]+:.*?' | grep -v -- '-setup:' | sed 's/:.*//g' | sort | uniq | tr '\n' ' ')"