Added lint target as php-cs-fixer only returns a non-zero exit code during dry run now

This commit is contained in:
Anthony Sterling
2017-09-23 22:04:26 +01:00
parent 589766e008
commit feecc9fcbb
2 changed files with 7 additions and 3 deletions

View File

@@ -11,4 +11,5 @@ install:
- travis_retry composer install --no-interaction --prefer-source - travis_retry composer install --no-interaction --prefer-source
script: script:
- make all - make lint
- make test

View File

@@ -1,12 +1,15 @@
THIS := $(realpath $(lastword $(MAKEFILE_LIST))) THIS := $(realpath $(lastword $(MAKEFILE_LIST)))
HERE := $(shell dirname $(THIS)) HERE := $(shell dirname $(THIS))
.PHONY: all fix test .PHONY: all fix lint test
all: fix test all: lint test
fix: fix:
php $(HERE)/vendor/bin/php-cs-fixer fix --config=$(HERE)/.php_cs php $(HERE)/vendor/bin/php-cs-fixer fix --config=$(HERE)/.php_cs
lint:
php $(HERE)/vendor/bin/php-cs-fixer fix --config=$(HERE)/.php_cs --dry-run
test: test:
php $(HERE)/vendor/bin/phpunit --configuration $(HERE)/phpunit.xml php $(HERE)/vendor/bin/phpunit --configuration $(HERE)/phpunit.xml