Skip to content

Commit

Permalink
Fix: Move .PHONY declaration to targets (#158)
Browse files Browse the repository at this point in the history
  • Loading branch information
localheinz authored Dec 20, 2020
1 parent a57232a commit 159cb8f
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,28 +1,34 @@
.PHONY: build cs coverage help test

.PHONY: help
help:
@grep -E '^[a-zA-Z0-9_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'

.PHONY: build
build: cs test static ## Runs test targets

.PHONY: cs
cs: vendor/autoload.php ## Fixes coding standard issues with php-cs-fixer
mkdir -p .build/
vendor/bin/php-cs-fixer fix --diff --diff-format=udiff --verbose

.PHONY: coverage
coverage: vendor/autoload.php ## Collects coverage with phpunit
vendor/bin/phpunit --coverage-text --coverage-clover=.build/logs/clover.xml

.PHONY: test
test: vendor/autoload.php ## Runs tests with phpunit
vendor/bin/phpunit

.PHONY: static
static: vendor/autoload.php ## Runs static analyzers
vendor/bin/phpstan analyze
vendor/bin/psalm

.PHONY: baseline
baseline: vendor/autoload.php ## Generate baseline files
vendor/bin/phpstan analyze --generate-baseline
vendor/bin/psalm --update-baseline

.PHONY: clean
clean: rm -rf vendor composer.lock .build ## Cleans up build and vendor files

vendor/autoload.php:
Expand Down

0 comments on commit 159cb8f

Please sign in to comment.