-
Notifications
You must be signed in to change notification settings - Fork 6
/
Makefile
43 lines (34 loc) · 2.13 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
.PHONY: help
help: ## Displays this list of targets with descriptions
@grep -E '^[a-zA-Z0-9_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[32m%-30s\033[0m %s\n", $$1, $$2}'
.PHONY: install
install: ## Install all dependencies for a development environment
composer install
.PHONY: coding-standard-check
coding-standard-check: ## Check coding-standard compliance
./vendor/bin/phpcs --basepath=. --standard=config/phpcs.xml
composer validate
composer normalize --dry-run
.PHONY: coding-standard-fix
coding-standard-fix: ## Apply automated coding standard fixes
./vendor/bin/phpcbf --basepath=. --standard=config/phpcs.xml
composer normalize
.PHONY: static-analysis
static-analysis: ## Run static analysis checks
./vendor/bin/phpstan --configuration=config/phpstan.neon
./vendor/bin/psalm --config config/psalm.xml --no-cache
.PHONY: static-analysis-update
static-analysis-update: ## Update static analysis baselines
./vendor/bin/phpstan --configuration=config/phpstan.neon --generate-baseline=config/phpstan-baseline.neon --allow-empty-baseline
./vendor/bin/psalm --config config/psalm.xml --set-baseline=psalm.baseline.xml --show-info=true --no-cache
.PHONY: security-analysis
security-analysis: ## Run static analysis security checks
./vendor/bin/psalm -c config/psalm.xml --taint-analysis
.PHONY: unit-tests
unit-tests: ## Run unit test suite
./vendor/bin/phpunit -c config/phpunit.xml.dist
.PHONY: composer-validate ## Validate composer file
composer-validate:
./vendor/bin/composer validate
.PHONY: check
check: coding-standard-check static-analysis security-analysis unit-tests ## Run all checks for local development iterations