Skip to content

Commit ee0742f

Browse files
committed
Update Makefile to match spec format
- Use individual .PHONY declarations per target - Use --colors -nsp flags as per spec - Add -q flag for CI checkstyle output
1 parent 2c5f21d commit ee0742f

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

Makefile

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,31 @@
1-
.PHONY: install qa cs csf phpstan tests coverage
2-
1+
.PHONY: install
32
install:
43
composer update
54

5+
.PHONY: qa
66
qa: phpstan cs
77

8+
.PHONY: cs
89
cs:
910
ifdef GITHUB_ACTION
10-
vendor/bin/phpcs --standard=ruleset.xml --encoding=utf-8 --extensions=php,phpt --tab-width=4 -sp src tests --report=checkstyle | cs2pr
11+
vendor/bin/phpcs --standard=ruleset.xml --encoding=utf-8 --extensions=php,phpt --colors -nsp -q --report=checkstyle src tests | cs2pr
1112
else
12-
vendor/bin/phpcs --standard=ruleset.xml --encoding=utf-8 --extensions=php,phpt --tab-width=4 -sp src tests
13+
vendor/bin/phpcs --standard=ruleset.xml --encoding=utf-8 --extensions=php,phpt --colors -nsp src tests
1314
endif
1415

16+
.PHONY: csf
1517
csf:
16-
vendor/bin/phpcbf --standard=ruleset.xml --encoding=utf-8 --extensions=php,phpt --tab-width=4 -sp src tests
18+
vendor/bin/phpcbf --standard=ruleset.xml --encoding=utf-8 --extensions=php,phpt --colors -nsp src tests
1719

20+
.PHONY: phpstan
1821
phpstan:
1922
vendor/bin/phpstan analyse -c phpstan.neon
2023

24+
.PHONY: tests
2125
tests:
2226
vendor/bin/tester -s -p php --colors 1 -C tests/Cases
2327

28+
.PHONY: coverage
2429
coverage:
2530
ifdef GITHUB_ACTION
2631
vendor/bin/tester -s -p phpdbg --colors 1 -C --coverage coverage.xml --coverage-src src tests/Cases

0 commit comments

Comments
 (0)