Download the PHP package hotwebmatter/drupal-quality-checker without Composer
On this page you can find all versions of the php package hotwebmatter/drupal-quality-checker. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download hotwebmatter/drupal-quality-checker
More information about hotwebmatter/drupal-quality-checker
Files in hotwebmatter/drupal-quality-checker
Package drupal-quality-checker
Short Description Code quality checking tools for Drupal project.
License proprietary
Homepage https://github.com/axelerant/drupal-quality-checker
Informations about the package drupal-quality-checker
Package for Drupal Code Quality presets
This has been customised from vijaycs85/drupal-quality-checker based on the Axelerant fork axelerant/drupal-quality-checker. Apart from a different template file, it uses the AxelerantDQCPlugin to copy default configuration files as described below.
Installation
Upgrading from Beta 8? Read the instructions for changes you need to make to grumphp.yml.dist.
This will add the plugin to your project and copy the default configuration files. These files are:
grumphp.yml.distphpcs.xml.distphpmd.xml.distphpstan.neon.dist
Since these are .dist files, the plugin will overwrite them on every composer install. If you mean to customize the default settings, then we recommend that you rename them to remove the .dist suffix. As such, it is a good idea to add these .dist files to your .gitignore file.
Usage
No additional steps required, but if git hooks aren't fired, run php ./vendor/bin/grumphp git:init. For additional commands, look at grumhp's documentation.
Customising
Almost all customising begins with first copying the grumphp.yml.dist file to your project. Make sure you have the file.
Adding tasks
There are various tasks you can add and customise in your grumphp.yml. Read the online documentation for GrumPHP tasks to see the tasks you can use and configure.
Forcing commit message format
To configure commit message structure, use the git_commit_message task. For example, to enforce the commit message contains the Jira issue ID, use the rule as the following snippet. More options are documented online.
Disable commit banners
GrumPHP supports banners to celebrate (or scold) on your commit. This is fun but it is possible it gets on your nerves. If you don’t want it, edit the grumphp.yml file and replace the following parameters:
You could even disable specific ones like this:
Overwrite phpmd ruleset
Copy the ruleset to the project root first
Edit it as per your needs and commit. Remember to modify the grumphp.yml file with the new path.
Customise phpcs rules
Copy the ruleset to the project root first
Edit it as per your needs and commit. Remember to modify the grumphp.yml file with the new path.
Customise phpstan rules
Copy the ruleset to the project root first
Edit it as per your needs and commit. Remember to modify the grumphp.yml file with the new path.
More about scaffolding
As described before, this package uses drupal/core-composer-scaffold plugin to scaffold a few files to the project root. This is not required but there is a good chance you are already using it if you're building a Drupal site.
The scaffolding operation runs with every composer operation and overwrites files. Only the file grumphp.yml.dist is not overwritten during subsequent operations. If you are customising any of the other configuration files and don't want the updates to overwrite your changes, you can override the behaviour in your composer.json file. For example, to skip phpmd.xml.dist from being overwritten, add this to your composer.json:
For more details, read the "Excluding Scaffold files" section of the documentation for the core-composer-scaffold plugin.
All versions of drupal-quality-checker with dependencies
dealerdirect/phpcodesniffer-composer-installer Version *
drupal/coder Version ^8.3.7
friendsoftwig/twigcs Version ^4.0 || ^5.0 || ^6.0
mglaman/phpstan-drupal Version ^1.2
php-parallel-lint/php-parallel-lint Version ^1.2
phpcompatibility/php-compatibility Version ^9.0
phpmd/phpmd Version ^2.8
phpro/grumphp-shim Version ^2.0