From 3bb88d2d07235d12f556ad5400ae96efff4b387f Mon Sep 17 00:00:00 2001 From: Emad Rad Date: Sun, 1 Dec 2024 15:46:05 +0330 Subject: [PATCH] feat: add help target and set as default goal --- Makefile | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index b1b349b..75f5ac4 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,6 @@ -test-requirements: +.DEFAULT_GOAL := help + +test-requirements: ## Install test requirements pip install black mypy pylint pyyaml types-PyYAML test: test-lint test-unit test-types test-format ## Run all tests by decreasing order of priority @@ -17,3 +19,9 @@ test-types: ## Check type definitions format: ## Format code black *.py + +ESCAPE =  +help: ## Print this help + @grep -E '^([a-zA-Z_-]+:.*?## .*|######* .+)$$' Makefile \ + | sed 's/######* \(.*\)/@ $(ESCAPE)[1;31m\1$(ESCAPE)[0m/g' | tr '@' '\n' \ + | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[33m%-30s\033[0m %s\n", $$1, $$2}'