Skip to content

Commit

Permalink
feat: add help target and set as default goal
Browse files Browse the repository at this point in the history
  • Loading branch information
CodeWithEmad authored and regisb committed Dec 2, 2024
1 parent 25ed626 commit 3bb88d2
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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}'

0 comments on commit 3bb88d2

Please sign in to comment.