-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlefthook.yaml
More file actions
61 lines (52 loc) · 1.74 KB
/
lefthook.yaml
File metadata and controls
61 lines (52 loc) · 1.74 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
pre-commit:
parallel: false
commands:
ensure-sync:
glob: "*.php"
run: bin/graphql-client-code-generator --config=examples/config.php --config=tests/config.php --ensure-sync
validate-examples:
glob:
- "*.php"
run: |
cd examples && for file in *.php; do
echo "Testing examples/$file..."
php "$file" > /dev/null 2>&1 || { echo "✗ Failed: examples/$file"; exit 1; }
echo "✓ Passed: examples/$file"
done
sync-readme-examples:
glob:
- "*.php"
- "*.md"
run: vendor/bin/readme-examples-sync
stage_fixed: true
composer-validate:
glob:
- "composer.json"
- "composer.lock"
run: composer validate --strict
composer-normalize:
glob: "composer.json"
run: composer normalize --diff
stage_fixed: true
composer-dependency-analyser:
glob:
- "*.php"
- "composer.json"
- "composer.lock"
run: vendor/bin/composer-dependency-analyser
php-cs-fixer:
glob: "*.php"
run: vendor/bin/php-cs-fixer fix --config .php-cs-fixer.php -- {staged_files}
stage_fixed: true
twig-cs-fixer:
glob: "*.twig"
run: vendor/bin/twig-cs-fixer fix -- {staged_files}
stage_fixed: true
phpstan:
glob:
- "*.php"
- "*.neon"
run: vendor/bin/phpstan
phpunit:
glob: "*.php"
run: vendor/bin/phpunit