-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f2811fe
commit cab24ba
Showing
2 changed files
with
48 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,50 @@ | ||
.PHONY: qa | ||
qa: cs tests infection phpstan rector-dry | ||
.PHONY: $(filter-out vendor,$(MAKECMDGOALS)) | ||
|
||
.PHONY: cs | ||
cs: | ||
vendor/bin/ecs --fix | ||
help: | ||
@printf "\033[33mUsage:\033[0m\n make [target] [arg=\"val\"...]\n\n\033[33mTargets:\033[0m\n" | ||
@grep -E '^[-a-zA-Z0-9_\.\/]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf " \033[32m%-15s\033[0m %s\n", $$1, $$2}' | ||
|
||
.PHONY: infection | ||
infection: | ||
vendor/bin/infection --min-msi=92 | ||
qa: comp lint stan rector-check tests cs ## Run all relevant code checks | ||
|
||
.PHONY: phpstan | ||
phpstan: | ||
vendor/bin/phpstan analyse | ||
comp: comp-check comp-norm ## Validate and normalize composer.json | ||
|
||
comp-check: ## Validate composer.json | ||
composer validate | ||
|
||
comp-norm: vendor ## Normalize composer.json | ||
composer normalize | ||
|
||
cs: cs-php ## Check and fix coding standards | ||
|
||
cs-check: cs-php-check ## Only check coding standards | ||
|
||
cs-php: vendor ## Check and fix PHP coding standards | ||
vendor/bin/ecs check --fix | ||
|
||
cs-php-check: vendor ## Only check PHP coding standards | ||
vendor/bin/ecs check | ||
|
||
.PHONY: rector | ||
rector: | ||
lint: lint-php | ||
|
||
lint-php: ## Lint PHP files | ||
find . -type f -name '*.php' ! -path "./vendor/*" -print0 | xargs -0 -n1 -P4 php -l -n | (! grep -v "No syntax errors detected" ) | ||
|
||
rector: vendor ## Apply rector rules | ||
vendor/bin/rector | ||
|
||
.PHONY: rector-dry | ||
rector-dry: | ||
rector-check: vendor ## Only check against rector rules | ||
vendor/bin/rector --dry-run | ||
|
||
.PHONY: tests | ||
tests: | ||
stan: vendor ## Run static analysis | ||
vendor/bin/phpstan analyse | ||
|
||
tests: tests-php-unit tests-php-mutation ## Run all tests | ||
|
||
tests-php-mutation: vendor ## Run PHP unit tests | ||
vendor/bin/infection --min-msi=92 | ||
|
||
tests-php-unit: vendor ## Run PHP unit tests | ||
vendor/bin/phpunit --configuration=phpunit.xml.dist | ||
|
||
vendor: composer.json $(wildcard composer.lock) ## Install PHP dependencies | ||
composer install |