-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgrumphp.conventions.yml
More file actions
84 lines (77 loc) · 3 KB
/
Copy pathgrumphp.conventions.yml
File metadata and controls
84 lines (77 loc) · 3 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
parameters:
convention.EXEC_GRUMPHP_COMMAND: 'docker run -i --rm --name my-running-script -v "$PWD":/app -w /app php:8.1-cli'
convention.ecs.config: ecs.php
convention.git_blacklist.keywords: [ 'die\\(', 'dd\\(', 'dump\\(', 'var_dump\\(', 'exit;' ]
convention.git_branch_name.blacklist: [ master, main ]
convention.git_branch_name.whitelist: [ ]
convention.doctrine_schema_check.command: './bin/console doctrine:schema:validate --skip-sync'
convention.lint_twig.command: './bin/console lint:twig templates'
convention.lint_yaml.command: './bin/console lint:yaml --parse-tags src config tests translations'
convention.phpstan.config: phpstan.neon
grumphp:
git_hook_variables:
EXEC_GRUMPHP_COMMAND: '%convention.EXEC_GRUMPHP_COMMAND%'
stop_on_failure: true
# Disable the ASCII artwork that takes up too much space in the console output
ascii:
failed: ~
succeeded: ~
tasks:
composer: ~ # Runs "composer validate" to check the file when it's been changed
composer_normalize: ~
doctrine_schema_check:
scripts: [ [ '-c', '%convention.doctrine_schema_check.command%' ] ]
triggered_by: [ xml, yaml, php ]
metadata: { task: shell }
ecs:
config: '%convention.ecs.config%'
git_blacklist:
keywords: '%convention.git_blacklist.keywords%'
git_branch_name:
blacklist: '%convention.git_branch_name.blacklist%'
whitelist: '%convention.git_branch_name.whitelist%'
git_commit_message:
max_subject_width: 72 # The old-school convention of 65 characters is way too limited
max_body_width: 72
lint_twig:
scripts: [["-c", '%convention.lint_twig.command%']]
triggered_by: [ twig ]
metadata: { task: shell }
lint_yaml:
scripts: [[ "-c", '%convention.lint_yaml.command%' ]]
triggered_by: [ yaml, yml ]
metadata: { task: shell }
phpstan:
configuration: '%convention.phpstan.config%'
phpstan_all:
configuration: '%convention.phpstan.config%'
use_grumphp_paths: false
metadata: { task: phpstan }
phpunit:
testsuite: Unit
phpunit_all:
testsuite: Unit,Integration
metadata: { task: paratest }
testsuites:
git_commit_msg:
tasks:
- git_commit_message
git_pre_commit:
tasks:
- git_branch_name # This should go first for maximum fail-fast
- git_blacklist
- ecs
- phpstan
- phpunit
- composer
- composer_normalize
- lint_twig
- lint_yaml
my_pre_push:
tasks:
- phpunit_all
- doctrine_schema_check
- phpstan_all
fixer:
enabled: true
fix_by_default: true