Skip to content

Commit 3bb88d2

Browse files
CodeWithEmadregisb
authored andcommitted
feat: add help target and set as default goal
1 parent 25ed626 commit 3bb88d2

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

Makefile

+9-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
test-requirements:
1+
.DEFAULT_GOAL := help
2+
3+
test-requirements: ## Install test requirements
24
pip install black mypy pylint pyyaml types-PyYAML
35

46
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
1719

1820
format: ## Format code
1921
black *.py
22+
23+
ESCAPE = 
24+
help: ## Print this help
25+
@grep -E '^([a-zA-Z_-]+:.*?## .*|######* .+)$$' Makefile \
26+
| sed 's/######* \(.*\)/@ $(ESCAPE)[1;31m\1$(ESCAPE)[0m/g' | tr '@' '\n' \
27+
| awk 'BEGIN {FS = ":.*?## "}; {printf "\033[33m%-30s\033[0m %s\n", $$1, $$2}'

0 commit comments

Comments
 (0)