miteshmap / drupal-quality-checker
Setups code quality checking tools for Drupal project.
Installs: 1 158
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 38
Open Issues: 0
Type:project
Requires
- dealerdirect/phpcodesniffer-composer-installer: *
- drupal/coder: >=8.3
- drupal/core-composer-scaffold: ^9.4 || ^10.0
- ergebnis/composer-normalize: >=2.5
- friendsoftwig/twigcs: >=5.0
- php-parallel-lint/php-parallel-lint: >=1.0
- phpro/grumphp-shim: ^1.16
- sebastian/phpcpd: >=4.0
This package is auto-updated.
Last update: 2025-03-18 01:49:50 UTC
README
Overview
Provides set of libraries to easily setup code quality checks based on GrumPHP for Drupal module/theme/profile. Check out this Lullabot article for more details.
Note: This library aim to help contributed/custom Drupal module/theme/profile hosted in individual git repository.
Install
- Add following code to
composer.json
underextra.drupal-scaffold.allowed-packages
section."extra": { "drupal-scaffold": { "allowed-packages": [ "miteshmap/drupal-quality-checker" ], } }
composer require "miteshmap/drupal-quality-checker:^1.0"
- copy
grumphp.yml.dist
in project's root directory (not Drupal root directory) with./grumphp.yml
That's it. Now, all tasks (listed below) run on every git commit
.
Note: As part of install, GrumPHP adds
pre-commit
hook to repository. Existingpre-commit
might get destroyed when install/uninstall.
Features
- PHPCS with Drupal standard.
- PHP Lint
- YAML Lint
- Composer
- Composer Normalize
- JSONLint
- PHP Copy/Paste Detector (CPD)
Long list of additional checks/validators available here.