-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathgrumphp.yml
executable file
·212 lines (208 loc) · 5.75 KB
/
grumphp.yml
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
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
# yamllint disable ...
# Project level GrumPHP configuration for Magento 2
grumphp:
hooks_preset: local
hide_circumvention_tip: false
process_timeout: 120
stop_on_failure: false
ignore_unstaged_changes: false
ascii:
failed: vendor/phpro/grumphp/resources/ascii/failed.txt
succeeded: vendor/phpro/grumphp/resources/ascii/succeeded.txt
parallel:
enabled: true
max_workers: 32
fixer:
enabled: true
fix_by_default: true
tasks:
jsonlint:
detect_key_conflicts: true
metadata:
priority: 100
xmllint:
ignore_patterns:
- "#test/(.*).xml#"
metadata:
priority: 100
phplint:
triggered_by: ["php", "phtml"]
metadata:
priority: 200
yamllint:
ignore_patterns:
- "#test/(.*).yml#"
- "#charts/.*#"
metadata:
priority: 100
composer:
file: ./composer.json
no_check_all: true
no_check_lock: false
no_check_publish: false
with_dependencies: false
strict: false
metadata:
priority: 80
composer_script:
script: post-install-cmd
triggered_by: [php, phtml]
working_directory: ~
npm_script:
script: lint
triggered_by: [js, jsx, coffee, ts, less, sass, scss]
working_directory: "./"
is_run_task: false
silent: false
# validate git commit message
git_commit_message:
allow_empty_message: false
enforce_capitalized_subject: false
enforce_no_subject_punctuations: false
enforce_no_subject_trailing_period: true
enforce_single_lined_subject: true
type_scope_conventions: []
max_body_width: 80
max_subject_width: 80
matchers:
# The format must followed Eg:"fix: WD-1234 shopping cart error"
"Commit message must contain issue topic and number": /^(HOTFIX|FIX|FEATURE|feat|chore|doc|test|refactor|temp|wip|INFRA|devops|system)\:\s(IT|WD)-\d+\s/
case_insensitive: true
multiline: false
additional_modifiers: ""
#########################
# validate git branch names
# git_branch_name:
# whitelist:
# # allowed branch names: 'feature-1', 'feature-new', 'feature-new1', 'task-1', etc
# - "/(hotfix|bugfix|feature|release|task)-([a-z|0-9]+)$/"
# blacklist:
# - "development"
# - "production"
# - "staging"
# - "master"
# - "infra"
# allow_detached_head: true
# catch not allowed keywords
git_blacklist:
keywords:
- "\\.dev"
- "\\.local"
- "\\.test"
- "<<<<<<<"
- "======="
- "DebuggerUtility"
- "ObjectManager::getInstance"
- "_GET\\["
- "_POST\\["
- "_REQUEST\\["
- "console.log\\("
- "die\\("
- "die;"
- "exit\\("
- "exit;"
- "fileadmin"
- "localhost"
- "phpinfo"
- "phpinfo\\("
- "print_r\\("
- "var_dump\\("
- "_objectManager"
- "ObjectManagerInterface"
triggered_by: ["php", "js", "html", "phtml"]
regexp_type: E
match_word: false
whitelist_patterns: []
metadata:
priority: 200
# https://devdocs.magento.com/guides/v2.4/coding-standards/code-standard-php.html
phpcs:
standard: Magento2
tab_width: 4
severity: 5 # can remove this to disallow all level of severity.
error_severity: 5
warning_severity: ~
report: full
ignore_patterns: []
triggered_by: [phtml, php]
metadata:
priority: 70
# phpcsfixer2:
# allow_risky: false
# config: ".php-cs-fixer.dist.php"
# triggered_by: ["php", "phtml"]
# using_cache: true
# cache_file: "./.php_cs.cache"
# # TODO: intersection mode throws errors
# config_contains_finder: false
# verbose: false
# diff: false
phpmd:
whitelist_patterns: []
report_format: ansi
ruleset:
[
"./dev/tests/static/testsuite/Magento/Test/Php/_files/phpmd/ruleset.xml",
"cleancode",
]
triggered_by: ["php"]
exclude:
- "./app/code/Magento/"
- "./app/code/*/*/Setup/"
metadata:
priority: 70
# uncomment to skip modules using whitelist patterns
# whitelist_patterns:
# - /^app\/code\/MyVendor\/MyModuleToSkip\/(.*)/
# https://devdocs.magento.com/guides/v2.4/test/testing.html#phpstan
phpstan:
autoload_file: ~
configuration: "./dev/tests/static/testsuite/Magento/Test/Php/_files/phpstan/phpstan.neon"
level: 5
triggered_by: ["php"]
force_patterns: []
ignore_patterns: []
memory_limit: "-1"
metadata:
priority: 90
# phpunit:
# always_execute: true
securitychecker_enlightn:
lockfile: ./composer.lock
run_always: false
######################################
eslint:
bin: node_modules/.bin/eslint
triggered_by: [js, jsx, ts, tsx, vue]
whitelist_patterns:
- /^resources\/js\/(.*)/
config: .eslintrc.json
debug: false
format: ~
max_warnings: ~
no_eslintrc: false
quiet: false
stylelint:
bin: node_modules/.bin/stylelint
triggered_by: [css, scss, sass, less, sss]
whitelist_patterns:
- /^resources\/css\/(.*)/
config: .stylelintrc.json
config_basedir: ~
ignore_path: ~
ignore_pattern: ~
syntax: ~
custom_syntax: ~
ignore_disables: ~
disable_default_ignores: ~
cache: ~
cache_location: ~
formatter: ~
custom_formatter: ~
quiet: ~
color: ~
report_needless_disables: ~
report_invalid_scope_disables: ~
report_descriptionless_disables: ~
max_warnings: ~
output_file: ~