From 88992f15187245609e3ac860f8bede1b6ca77228 Mon Sep 17 00:00:00 2001 From: Alex Creasy Date: Tue, 19 Nov 2024 16:02:27 +0000 Subject: [PATCH] Improves 'make help' documentation Signed-off-by: Alex Creasy --- clients/ui/bff/Makefile | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/clients/ui/bff/Makefile b/clients/ui/bff/Makefile index b8e6ccdd3..ea5236262 100644 --- a/clients/ui/bff/Makefile +++ b/clients/ui/bff/Makefile @@ -16,40 +16,40 @@ help: ## Display this help. @awk 'BEGIN {FS = ":.*##"; printf "\nUsage:\n make \033[36m\033[0m\n"} /^[a-zA-Z_0-9-]+:.*?##/ { printf " \033[36m%-15s\033[0m %s\n", $$1, $$2 } /^##@/ { printf "\n\033[1m%s\033[0m\n", substr($$0, 5) } ' $(MAKEFILE_LIST) .PHONY: fmt -fmt: +fmt: ## Applies the correct code style to source files using go fmt. go fmt ./... -.PHONY: clean +.PHONY: clean ## Deletes previously built binaries. clean: rm -Rf ./bin .PHONY: lint -lint: golangci-lint ## Run golangci-lint linter +lint: golangci-lint ## Run golangci-lint to automatically check source code for programmatic and stylistic errors. $(GOLANGCI_LINT) run .PHONY: lint-fix -lint-fix: golangci-lint ## Run golangci-lint linter and perform fixes +lint-fix: golangci-lint ## Run golangci-lint to automatically check source code for programmatic and stylistic errors and, additionally perform fixes where possible. $(GOLANGCI_LINT) run --fix .PHONY: vet -vet: . +vet: . ## Run static analysis tools on the source code and reports suspicious constructs that could be bugs or syntactical errors. go vet ./... .PHONY: test -test: fmt vet envtest +test: fmt vet envtest ## Runs the full test suite. ENVTEST_ASSETS="$(shell $(ENVTEST) use $(ENVTEST_K8S_VERSION) --bin-dir $(LOCALBIN) -p path)" \ go test ./... .PHONY: build -build: fmt vet test +build: fmt vet test ## Builds the project to produce a binary executable. go build -o bin/bff cmd/main.go -.PHONY: run +.PHONY: run ## Runs the project. run: fmt vet envtest ENVTEST_ASSETS="$(shell $(ENVTEST) use $(ENVTEST_K8S_VERSION) --bin-dir $(LOCALBIN) -p path)" \ go run ./cmd/main.go --port=$(PORT) --mock-k8s-client=$(MOCK_K8S_CLIENT) --mock-mr-client=$(MOCK_MR_CLIENT) --dev-mode=$(DEV_MODE) --dev-mode-port=$(DEV_MODE_PORT) -.PHONY: docker-build +.PHONY: docker-build ## Builds a container for the project. docker-build: $(CONTAINER_TOOL) build -t ${IMG} .