Skip to content

Commit

Permalink
Enhancement: Add help as first target to Makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
localheinz authored and pimjansen committed Aug 25, 2019
1 parent ba35d4f commit aa6ea48
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
.PHONY: build fix sniff test
.PHONY: build fix help sniff test

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

fix: vendor/autoload.php
build: fix test ## Runs fix and test targets

fix: vendor/autoload.php ## Fixes code style issues with phpcbf
vendor/bin/phpcbf --standard=PSR2 src

sniff: vendor/autoload.php
sniff: vendor/autoload.php ## Detects code style issues with phpcs
vendor/bin/phpcs --standard=PSR2 src -n

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

vendor/autoload.php:
Expand Down

0 comments on commit aa6ea48

Please sign in to comment.