Skip to content

Commit 9efd5f8

Browse files
committed
Update Makefile
1 parent 7b29fb2 commit 9efd5f8

File tree

1 file changed

+22
-9
lines changed

1 file changed

+22
-9
lines changed

Makefile

Lines changed: 22 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,33 @@
1-
.PHONY: help
2-
3-
help:
4-
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
5-
6-
install:
1+
.PHONY: help install qa cs csf phpstan tests coverage-clover coverage-html
2+
.DEFAULT_GOAL := help
3+
4+
help: ## This help
5+
@printf "\033[33mUsage:\033[0m\n make <command>\n\n\033[33mAvailable commands:\033[0m\n";
6+
@grep -F -h "##" $(MAKEFILE_LIST) | grep -F -v grep -F | sed -e 's/\\$$//' | awk 'BEGIN {FS = ":*[[:space:]]*##[[:space:]]*"}; \
7+
{ \
8+
if($$2 == "") \
9+
printf; \
10+
else if($$0 ~ /^#/) \
11+
printf " \033[36m%s\033[0m\n", $$2; \
12+
else if($$1 == "") \
13+
printf " %-20s%s\n", "", $$2; \
14+
else \
15+
printf " \033[32m%-20s\033[0;0m %s\n", $$1, $$2; \
16+
}'
17+
18+
install: ## Install composer dependencies
719
composer update
820

21+
qa: ## Quality assurance (code sniffer and phpstan)
922
qa: phpstan cs
1023

11-
cs:
24+
cs: ## Run code sniffer
1225
composer phpcs
1326

14-
csf:
27+
csf: ## Run code sniffer and fix errors
1528
composer fix-style
1629

17-
phpstan:
30+
phpstan: ## Run phpstan
1831
vendor/bin/phpstan analyse src
1932

2033
tests:

0 commit comments

Comments
 (0)