Repository navigation
Expand file tree
/
Copy pathjustfile
More file actions
133 lines (104 loc) · 3.58 KB
/
Copy pathjustfile
File metadata and controls
133 lines (104 loc) · 3.58 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
set shell := ["bash", "-c"]
composer := "composer"
[group("Just")]
default: just-choose
alias help := just-help
[doc("Choose from available recipes")]
[group("Just")]
just-choose:
@just --choose
[doc("List available recipes")]
[group("Just")]
just-help:
@just --list
[doc("Format Justfile")]
[group("Just")]
just-format:
@just --dump > justfile_formatted
@mv justfile_formatted justfile
[doc("Install composer dependencies")]
[group("Composer")]
composer-install:
{{ composer }} install
[doc("Run all coding-standard checks")]
[group("Coding standard")]
coding-standard-check: cs-check-php cs-check-composer
[doc("Apply all automated coding-standard fixes")]
[group("Coding standard")]
coding-standard-fix: cs-fix-php cs-fix-composer
[doc("Check PHP code sniffer")]
[group("Coding standard")]
cs-check-php:
vendor/bin/phpcs --basepath=. --standard=config/phpcs.xml
[doc("Fix PHP code sniffer")]
[group("Coding standard")]
cs-fix-php *args="":
vendor/bin/phpcbf --basepath=. --standard=config/phpcs.xml {{ args }}
[doc("Check composer files")]
[group("Coding standard")]
cs-check-composer:
{{ composer }} validate
{{ composer }} normalize --dry-run
[doc("Fix composer files")]
[group("Coding standard")]
cs-fix-composer:
{{ composer }} normalize
[doc("Run static analysis checks")]
[group("Static analysis")]
static-analysis: sa-mago sa-phpstan
[doc("Run PHPStan")]
[group("PHPStan")]
sa-phpstan:
vendor/bin/phpstan --memory-limit=1G --configuration=config/phpstan.neon
[doc("Update PHPStan baseline")]
[group("PHPStan")]
sa-phpstan-update:
vendor/bin/phpstan --configuration=config/phpstan.neon --generate-baseline=config/phpstan-baseline.neon --allow-empty-baseline
[doc("Run all Mago checks")]
[group("Mago")]
sa-mago: sa-mago-lint sa-mago-analyze
[doc("Run Mago linter")]
[group("Mago")]
sa-mago-lint:
vendor/bin/mago --config config/mago.toml lint --minimum-fail-level note --baseline config/mago-lint-baseline.toml --fail-on-out-of-sync-baseline
[doc("Update Mago linter baseline")]
[group("Mago")]
sa-mago-lint-update:
vendor/bin/mago --config config/mago.toml lint --minimum-fail-level note --generate-baseline --baseline config/mago-lint-baseline.toml
[doc("Fix Mago linter issues")]
[group("Mago")]
sa-mago-lint-fix:
vendor/bin/mago --config config/mago.toml lint --fix
[doc("Run Mago analyzer")]
[group("Mago")]
sa-mago-analyze:
vendor/bin/mago --config config/mago.toml analyze --minimum-fail-level note --baseline config/mago-analyze-baseline.toml --fail-on-out-of-sync-baseline
[doc("Update Mago analyzer baseline")]
[group("Mago")]
sa-mago-analyze-update:
vendor/bin/mago --config config/mago.toml analyze --minimum-fail-level note --generate-baseline --baseline config/mago-analyze-baseline.toml
[doc("Fix Mago analyzer issues")]
[group("Mago")]
sa-mago-analyze-fix:
vendor/bin/mago --config config/mago.toml analyze --fix --baseline config/mago-analyze-baseline.toml
[doc("Run security checks")]
[group("Security")]
security-analysis: security-analysis-packages
[doc("Run security checks for packages")]
[group("Security")]
security-analysis-packages:
{{ composer }} audit
[doc("Run all tests")]
[group("Tests")]
test: test-php
[doc("Run PHP tests")]
[group("Tests")]
test-php *args="":
vendor/bin/phpunit -c config/phpunit.xml.dist {{ args }}
[doc("Regenerate the expected command output (review the diff!)")]
[group("Tests")]
update-snapshots:
UPDATE_SNAPSHOTS=1 vendor/bin/phpunit -c config/phpunit.xml.dist tests/Command
[doc("Run all checks")]
[group("Aggregate")]
check: coding-standard-check static-analysis security-analysis test