configs/grumphp-extension.yml
grumphp:
process_timeout: 3600
hide_circumvention_tip: true
ascii:
failed: ~
succeeded: ~
fixer:
enabled: true
fix_by_default: true
environment:
paths:
- .env
- .env.local
testsuites:
git_commit_msg:
tasks:
- git_commit_message
git_pre_commit:
tasks:
- composer
- git_blacklist
- git_branch_name
- phpcpd
- phpcs
- phpmd
- phpstan
- securitychecker_enlightn
- twigcs
- yamllint
tests:
tasks:
- phpunit
tasks:
composer: ~
composer_normalize: ~
git_blacklist:
keywords:
- " die\\("
- " exit;"
- " exit\\("
- "\\$_[A-Z_]+\\["
regexp_type: E
triggered_by:
- inc
- install
- module
- php
- profile
- theme
git_branch_name:
whitelist:
- "#^main|^master|^develop|^\\d+(\\.\\d+)?\\.x|^(release|hotfix)/\\d+\\.\\d+\\.\\d+|^feature/([A-Z][A-Z\\d]+-\\d+|[a-z][a-z\\d]*(-[a-z\\d]+)*)$#"
git_commit_message:
matchers:
- "/^([A-Z][A-Z\\d]+-\\d+(, [A-Z][A-Z\\d]+-\\d+)*: )?(Add|Change|Fix|Update|Remove|Refactor|Merge|RELEASE) /"
case_insensitive: false
phpcpd:
exclude:
- tests
- vendor
- "*.api.php"
- "*Test.php"
- "*TestBase.php"
- "*TestCase.php"
min_lines: 10
triggered_by:
- inc
- install
- module
- php
- profile
- theme
phpcs:
standard:
- phpcs.qa-drupal.xml
report_width: 120
ignore_patterns:
- build/
- node_modules/
- vendor/
triggered_by:
- css
- inc
- install
- js
- module
- php
- profile
- theme
- twig
- yml
phpmd:
ruleset:
- phpmd.qa-drupal.xml
exclude:
- "build/*"
- "tests/*"
- "vendor/*"
triggered_by:
- inc
- install
- module
- php
- profile
- theme
phpstan:
configuration: phpstan.qa-drupal.neon
ignore_patterns:
- "#(^|/)tests/#"
- "#^vendor/#"
triggered_by:
- inc
- install
- module
- php
- profile
- theme
phpunit:
config_file: phpunit.qa-drupal.xml
securitychecker_enlightn:
lockfile: ./composer.lock
run_always: false
twigcs:
path: '.'
severity: 'warning'
ruleset: 'Digipolisgent\QA\Drupal\Twigcs\Ruleset\Twig'
triggered_by:
- twig
exclude:
- vendor
yamllint:
ignore_patterns:
- node_modules/
- "#^vendor/#"
services:
listener.qa_drupal.console:
class: Digipolisgent\QA\Drupal\GrumPHP\EventListener\ConsoleEventListener
tags:
- { name: grumphp.event_listener, event: console.terminate, method: onTerminate }
- { name: grumphp.event_listener, event: console.exception, method: onException }
listener.qa_drupal.task:
class: Digipolisgent\QA\Drupal\GrumPHP\EventListener\TaskEventListener
tags:
- { name: grumphp.event_listener, event: grumphp.task.run, method: onRun, priority: 100 }