vijaycs85 / drupal-quality-checker
Setups code quality checking tools for Drupal project.
Installs: 188 096
Dependents: 5
Suggesters: 0
Security: 0
Stars: 52
Watchers: 5
Forks: 38
Open Issues: 13
Type:project
Requires
- dealerdirect/phpcodesniffer-composer-installer: *
- drupal/coder: >=8.3
- ergebnis/composer-normalize: >=2.5
- php-parallel-lint/php-parallel-lint: >=1.0
- phpro/grumphp: ^0.18
- sebastian/phpcpd: >=4.0
This package is auto-updated.
Last update: 2024-10-27 19:14:49 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
vijaycs85/drupal-quality-checker
tocomposer.json
(like here) or justcomposer require --dev vijaycs85/drupal-quality-checker
- Replace
grumphp.yml
in project's root directory (not Drupal root directory) withvendor/vijaycs85/drupal-quality-checker/grumphp.yml.dist
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.
Sample
Pass
Fail
Demo
Implemented in Modal Configuration module.