-
Notifications
You must be signed in to change notification settings - Fork 8
/
Makefile
73 lines (53 loc) · 2.47 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
help: ## shows this help
@awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z_\-\.]+:.*?## / {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST)
vendor: composer.lock
composer install
.PHONY: phpcs-check
phpcs-check: vendor ## run phpcs
vendor/bin/phpcs
.PHONY: phpcs-fix
cs: vendor ## run phpcs fixer
vendor/bin/phpcbf
.PHONY: phpstan
phpstan: vendor ## run phpstan static code analyser
vendor/bin/phpstan analyse
.PHONY: phpstan-baseline
phpstan-baseline: vendor ## run phpstan static code analyser
vendor/bin/phpstan analyse --generate-baseline
.PHONY: psalm
psalm: vendor ## run psalm static code analyser
vendor/bin/psalm
.PHONY: psalm-baseline
psalm-baseline: vendor ## run psalm static code analyser
vendor/bin/psalm --update-baseline --set-baseline=baseline.xml
.PHONY: phpunit
phpunit: vendor ## run phpunit tests
XDEBUG_MODE=coverage vendor/bin/phpunit
.PHONY: static
static: psalm phpstan phpcs-check ## run static analyser
test: phpunit ## run tests
.PHONY: dev
dev: static test ## run dev tools
.PHONY: docs
docs: mkdocs ## run mkdocs
cd docs && python3 -m mkdocs serve
.PHONY: mkdocs
mkdocs: ## run mkdocs
cd docs && pip3 install -r requirements.txt
.PHONY: docs-extract-php
docs-extract-php:
bin/docs-extract-php-code
.PHONY: docs-inject-php
docs-inject-php:
bin/docs-inject-php-code
.PHONY: docs-format
docs-format: docs-phpcs docs-inject-php
.PHONY: docs-php-lint
docs-php-lint: docs-extract-php
php -l docs_php/*.php
.PHONY: docs-phpcs
docs-phpcs: docs-extract-php
vendor/bin/phpcbf docs_php --exclude=SlevomatCodingStandard.TypeHints.DeclareStrictTypes || true
.PHONY: docs-psalm
docs-psalm: docs-extract-php
vendor/bin/psalm --config=psalm_docs.xml