Repository navigation
Expand file tree
/
Copy pathgrumphp.yml
More file actions
112 lines (106 loc) · 3.19 KB
/
Copy pathgrumphp.yml
File metadata and controls
112 lines (106 loc) · 3.19 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
grumphp:
git_hook_variables:
# Configures GrumPHP to execute PHP commands through DDEV.
EXEC_GRUMPHP_COMMAND: ddev exec php
extensions:
# Add PHPCompatibility extension to check for PHP version compatibility.
- Metadrop\PhpCompatibilityTask\ExtensionLoader
tasks:
# Commit message checks.
git_commit_message:
enforce_no_subject_trailing_period: true
max_subject_width: 130
case_insensitive: false
matchers:
'Must start with an issue tracker issue reference (example: "Issue #123", if no reference use 0)': '/(^Issue #[0-9]+:|^Merge branch.)/'
Space and uppercase after reference: '/(^Issue #[0-9]+: [A-Z]|^Merge branch.)/'
# Detect debugging code left in the codebase.
git_blacklist:
keywords:
- "var_dump"
- "print_r"
- "console.log"
whitelist_patterns: [ ]
regexp_type: G
match_word: false
# Allowed branches for commits.
git_branch_name:
# Only commits to feature/, bugfix/, hotfix/ and develop branches are
# allowed. This forces to use branches with a proper naming convention and
# avoids direct commits to main or release branches.
# If this is not matching your workflow, you can modify the configuration
# as needed.
whitelist:
- "feature\/[0-9A-Za-z\\s_-]*"
- "bugfix\/[0-9A-Za-z\\s_-]*"
- "hotfix\/[0-9A-Za-z\\s_-]*"
- develop
blacklist:
- main
- release
additional_modifiers: ''
allow_detached_head: true
# Enable various linters and Composer checks.
phplint:
ignore_patterns:
- '#web/sites/default/example\.settings\.local\.php#'
yamllint: ~
composer: ~
jsonlint: ~
# Limit committed files size. BackstopJS reference images are ignored for
# this check.
file_size:
max_size: 4M
ignore_patterns:
- '#tests/backstopjs/backstop_data/bitmaps_reference/(.*).png#'
# Enable PHP Mess Detector with custom ruleset.
phpmd:
exclude:
- tests/
- web/sites/default/example.settings.local.php
ruleset: [ '/phpmd.xml.dist' ]
triggered_by:
- php
- inc
- module
- install
- profile
- theme
- feature
- info
- test
# Enable PHP CodeSniffer with Drupal standards.
phpcs:
encoding: utf-8
ignore_patterns:
- '#web/sites/default/example\.settings\.local\.php#'
triggered_by:
- php
- inc
- module
- install
- profile
- theme
- feature
- info
- txt
- test
standard: Drupal,DrupalPractice,PHPCompatibility
# Enable PHP Compatibility checks. Modify testVersion as needed.
php_compatibility:
testVersion: "8.1"
triggered_by:
- php
- inc
- module
- install
# Enalbe running PHPStan static analysis.
phpstan:
autoload_file: ~
configuration: ~
force_patterns: []
ignore_patterns:
- '#web/sites/default/example\.settings\.local\.php#'
triggered_by: ['php', 'module', 'inc', 'theme', 'install']
memory_limit: "-1"
use_grumphp_paths: true