Skip to content
This repository was archived by the owner on Oct 30, 2024. It is now read-only.

Commit 67e5d5e

Browse files
committed
Better Makefile also added lint-php to the CI
1 parent f8ab915 commit 67e5d5e

2 files changed

Lines changed: 9 additions & 5 deletions

File tree

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ before_install:
1616
before_script:
1717
- make deps
1818
script:
19+
- mkdir -p lint-php
1920
- mkdir -p build/logs
2021
- make test
2122
after_script:

Makefile

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,31 @@
11
lint: lint-php lint-psr2 lint-squiz
22

3+
.PHONY: lint-php
34
lint-php:
45
find src -name *.php -exec php -l {} \;
56
find test -name *.php -exec php -l {} \;
67
find spec -name *.php -exec php -l {} \;
78
find examples -name *.php -exec php -l {} \;
89

10+
.PHONY: lint-psr2
911
lint-psr2:
1012
#./vendor/bin/phpcbf --standard=PSR2 src test examples
1113
./vendor/bin/phpcs --standard=PSR2 --colors -w -s --warning-severity=0 src test examples
1214

15+
.PHONY: lint-squiz
1316
lint-squiz:
1417
# ./vendor/bin/phpcbf --standard=Squiz,./ruleset.xml src test examples
1518
./vendor/bin/phpcs --standard=Squiz,./ruleset.xml --colors -w -s --warning-severity=0 src test examples
1619

1720

18-
test: tdd bdd
21+
test: test-tdd test-bdd
1922

20-
tdd:
23+
.PHONY: test-tdd
24+
test-bdd:
2125
./vendor/bin/phpunit test
2226

23-
bdd:
27+
.PHONY: test-bdd
28+
test-bdd:
2429
./vendor/bin/phpspec run --format=pretty -v
2530

2631
cover:
@@ -49,5 +54,3 @@ phpdoc:
4954

5055
serve-phpdoc:
5156
cd docs/api && php -S localhost:8000 && cd ../..
52-
53-
.PHONY: lint test cs cover deps dist-clean

0 commit comments

Comments
 (0)