b-connect / grumphp-config
Default grump config for projects
Requires
- drupal/coder: ^8.3
- ergebnis/composer-normalize: ^2.28
- friendsoftwig/twigcs: ^6
- mglaman/phpstan-drupal: ^1.1.18
- phpro/grumphp: ^1.1
- phpstan/phpstan: ^1.7.8
- phpstan/phpstan-deprecation-rules: ^1.0
- squizlabs/php_codesniffer: ^3.6.2
- twig/twig: ^2.0
This package is auto-updated.
Last update: 2024-10-27 23:26:49 UTC
README
Install
composer req shaquer/grumphp-config --dev
Add following to your composer.json
"extra": { "grumphp": { "config-default-path": "vendor/shaquer/grumphp-config/grumphp.yml" } }
Twig CS
Whitelist
/^(docroot|web)\/modules\/custom\/(.*)/
/^(docroot|web)\/themes\/custom\/(.*)/
/^(docroot|web)\/themes\/patternlab\/(.*)/
Json lint
Ignore
'/^(?!docroot\/modules\/custom).*/'
'/^(?!web\/modules\/custom).*/'
Git commit messages
No empty messages allowed.
Suffix must be in commit messaged.
Allowed suffixes (Type scope conventions)
- build
- ci
- chore
- docs
- feat
- fix
- new
- upd
- perf
- refactor
- revert
- style
- test
- chg
PHP Stan
Ignore all contrib code.
Whitelist
'/^(?!docroot\/modules\/custom).*/'
'/^(?!web\/modules\/custom).*/'
Yaml lint
Check all yamls.
Whitelist
/^(docroot|web)\/modules\/custom\/(.*)/
/^(docroot|web)\/themes\/custom\/(.*)/
Git blacklist
Following code is not allowed
- "die("
- "dsm("
- "print_r("
- "var_dump("
- "exit;"
Whitelist
/^(docroot|web)\/modules\/custom\/(.*)/
/^(docroot|web)\/themes\/custom\/(.*)/
PHP CS
Check for Drupal and DrupalPractice.
Ignore folders
config/
docroot/libraries/
docroot/themes/custom/*/components
web/libraries/
web/themes/custom/*/components
Whitelist
/^(docroot|web)\/modules\/custom\/(.*)/
/^(docroot|web)\/themes\/custom\/(.*)/