Repository navigation
Expand file tree
/
Copy pathMakefile
More file actions
60 lines (48 loc) · 1.61 KB
/
Copy pathMakefile
File metadata and controls
60 lines (48 loc) · 1.61 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
.PHONY: check
check: lint cs tests phpstan
.PHONY: tests
tests:
php vendor/bin/phpunit
.PHONY: lint
lint:
php vendor/bin/parallel-lint --colors \
src tests \
--exclude tests/PHPStan/Analyser/data \
--exclude tests/PHPStan/Rules/Methods/data \
--exclude tests/PHPStan/Rules/Functions/data
.PHONY: cs-install
cs-install:
git clone https://github.com/phpstan/build-cs.git || true
git -C build-cs fetch origin && git -C build-cs reset --hard origin/2.x
composer install --working-dir build-cs
.PHONY: cs
cs:
php build-cs/vendor/bin/phpcs src tests
.PHONY: cs-fix
cs-fix:
php build-cs/vendor/bin/phpcbf src tests
.PHONY: phpstan
phpstan:
php vendor/bin/phpstan
.PHONY: phpstan-generate-baseline
phpstan-generate-baseline:
php vendor/bin/phpstan --generate-baseline
# ---------------------------------------------------------------------------
# The grammars
# ---------------------------------------------------------------------------
# The tool writing a corpus out of doc/grammars is a development dependency of
# its own, because the grammar compiler asks for a PHP this library still runs
# without.
.PHONY: grammars-install
grammars-install:
composer install --no-interaction --working-dir tools/phplrt
# ---------------------------------------------------------------------------
# The benchmarks
# ---------------------------------------------------------------------------
# Tally is a development dependency of its own too, because it needs PHP 8.2.
.PHONY: bench-install
bench-install:
composer install --no-interaction --working-dir tools/tally
.PHONY: bench
bench:
php tools/tally/vendor/bin/tally run