PHPackages                             innoraft/drupal-quality-checker - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Testing &amp; Quality](/categories/testing)
4. /
5. innoraft/drupal-quality-checker

ActiveProject[Testing &amp; Quality](/categories/testing)

innoraft/drupal-quality-checker
===============================

Setups code quality checking tools for Drupal project.

3.0.1(6mo ago)056.6k↓23.1%82MITShell

Since Nov 15Pushed 4mo ago3 watchersCompare

[ Source](https://github.com/innoraft/drupal-quality-checker)[ Packagist](https://packagist.org/packages/innoraft/drupal-quality-checker)[ RSS](/packages/innoraft-drupal-quality-checker/feed)WikiDiscussions master Synced 2w ago

READMEChangelog (7)Dependencies (14)Versions (8)Used By (2)

Drupal Code Quality Checker
===========================

[](#drupal-code-quality-checker)

---

Overview
--------

[](#overview)

This composer package will provide some basic code quality checks before committing code by using . Check out this [Lullabot article](https://www.lullabot.com/articles/how-enforce-drupal-coding-standards-git) for more details.

This has been customised from [vijaycs85/drupal-quality-checker](https://packagist.org/packages/vijaycs85/drupal-quality-checker) for Innoraft needs.

Install
-------

[](#install)

1. Add `innoraft/drupal-quality-checker` to `composer.json` or just run

    ```
    composer require --dev innoraft/drupal-quality-checker
    ```
2. Replace `grumphp.yml` in project's root directory (not Drupal root directory) with `vendor/innoraft/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. Existing `pre-commit` might get [destroyed](https://github.com/phpro/grumphp/issues/416) when install/uninstall.

Out of the box
--------------

[](#out-of-the-box)

1. [PHPCS](https://github.com/squizlabs/PHP_CodeSniffer) with Drupal standard.
2. [PHP Lint](http://www.icosaedro.it/phplint/)
3. [YAML Lint](http://www.yamllint.com/)
4. [Composer](https://github.com/composer/composer)
5. [Composer Normalize](https://github.com/ergebnis/composer-normalize)
6. [JSONLint](https://jsonlint.com/)
7. [Trufflehog](https://trufflesecurity.com/trufflehog/)

Long list of additional checks/validators available [here](https://github.com/phpro/grumphp/blob/master/doc/tasks.md#tasks-1).

To automatically setup all the packages, follow the below steps:
----------------------------------------------------------------

[](#to-automatically-setup-all-the-packages-follow-the-below-steps)

1. Download the [setup.sh](setup.sh) file and place it outside the docroot.
2. Update Line 12 of setup.sh having the command `composer require --dev innoraft/drupal-quality-checker`. Use the appropriate environment for your setup. For example, if you are working with Lando, use `lando composer require --dev innoraft/drupal-quality-checker`.
3. Update Line 102 of setup.sh having the command `composer dump-autoload`. Use the appropriate environment for your setup. For example, if you are working with Lando, use `lando composer dump-autoload`.
4. From outside the docroot run this command that will make the bash script executable

    ```
    chmod +x setup.sh
    ```
5. To execute the bash script run this command from outside the docroot

    ```
    ./setup.sh
    ```
6. After executing the script, a prompt will appear asking for the base directory name , site name and custom theme name, which need to be entered [![cmd](https://private-user-images.githubusercontent.com/122454028/353717417-7fdb6c2e-843b-44a9-9f28-08e8f2470e8f.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3ODU1ODY1OTYsIm5iZiI6MTc4NTU4NjI5NiwicGF0aCI6Ii8xMjI0NTQwMjgvMzUzNzE3NDE3LTdmZGI2YzJlLTg0M2ItNDRhOS05ZjI4LTA4ZThmMjQ3MGU4Zi5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjYwODAxJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI2MDgwMVQxMjExMzZaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT00YjIyZjBlOTA2ZGVjNzM5NjkwMGI5MjYxYTgwMzFmYzE5N2Y0MWM2Mjk2Yzg1M2Q5MTEwZmJiZDEzMDM5NmI1JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZyZXNwb25zZS1jb250ZW50LXR5cGU9aW1hZ2UlMkZwbmcifQ.kX8LZLcb_vju0fGLWaPBw7eKdOv725u1xJRzQNT802U)](https://private-user-images.githubusercontent.com/122454028/353717417-7fdb6c2e-843b-44a9-9f28-08e8f2470e8f.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3ODU1ODY1OTYsIm5iZiI6MTc4NTU4NjI5NiwicGF0aCI6Ii8xMjI0NTQwMjgvMzUzNzE3NDE3LTdmZGI2YzJlLTg0M2ItNDRhOS05ZjI4LTA4ZThmMjQ3MGU4Zi5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjYwODAxJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI2MDgwMVQxMjExMzZaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT00YjIyZjBlOTA2ZGVjNzM5NjkwMGI5MjYxYTgwMzFmYzE5N2Y0MWM2Mjk2Yzg1M2Q5MTEwZmJiZDEzMDM5NmI1JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZyZXNwb25zZS1jb250ZW50LXR5cGU9aW1hZ2UlMkZwbmcifQ.kX8LZLcb_vju0fGLWaPBw7eKdOv725u1xJRzQNT802U)
7. Few other prompts will appear where consent is needed to download the required package for the configuration

    [![image](https://private-user-images.githubusercontent.com/122454028/353346644-e7a904dc-90a8-41de-97cf-1fa2c4129dfc.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3ODU1ODY1OTYsIm5iZiI6MTc4NTU4NjI5NiwicGF0aCI6Ii8xMjI0NTQwMjgvMzUzMzQ2NjQ0LWU3YTkwNGRjLTkwYTgtNDFkZS05N2NmLTFmYTJjNDEyOWRmYy5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjYwODAxJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI2MDgwMVQxMjExMzZaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1kZTIxYmQ4Mjg1NGUxZWM2YzcxYTUzOWI0YzQ1YTgxMWQyNGUxZGFjN2Q0NTAyNDJkZGRiNjZhMTYzMzkxYmVjJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZyZXNwb25zZS1jb250ZW50LXR5cGU9aW1hZ2UlMkZwbmcifQ.N-UbBFwmNZKsvKVaRFCs7-eQpLMAIEtMZpxKIpzpqIg)](https://private-user-images.githubusercontent.com/122454028/353346644-e7a904dc-90a8-41de-97cf-1fa2c4129dfc.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3ODU1ODY1OTYsIm5iZiI6MTc4NTU4NjI5NiwicGF0aCI6Ii8xMjI0NTQwMjgvMzUzMzQ2NjQ0LWU3YTkwNGRjLTkwYTgtNDFkZS05N2NmLTFmYTJjNDEyOWRmYy5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjYwODAxJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI2MDgwMVQxMjExMzZaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1kZTIxYmQ4Mjg1NGUxZWM2YzcxYTUzOWI0YzQ1YTgxMWQyNGUxZGFjN2Q0NTAyNDJkZGRiNjZhMTYzMzkxYmVjJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZyZXNwb25zZS1jb250ZW50LXR5cGU9aW1hZ2UlMkZwbmcifQ.N-UbBFwmNZKsvKVaRFCs7-eQpLMAIEtMZpxKIpzpqIg)
8. When prompted for tasks to run, select any option, as grumphp.yml is already included in the package and will be used for setup, making this selection less critical:

    [![image](https://private-user-images.githubusercontent.com/122454028/353347176-930fce63-51c8-4ff0-951c-61dc8644c1f9.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3ODU1ODY1OTYsIm5iZiI6MTc4NTU4NjI5NiwicGF0aCI6Ii8xMjI0NTQwMjgvMzUzMzQ3MTc2LTkzMGZjZTYzLTUxYzgtNGZmMC05NTFjLTYxZGM4NjQ0YzFmOS5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjYwODAxJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0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9. After this, please wait for some time for the script to execute and the setup to be completed.

Incase you want to install them individually, follow the below steps:
---------------------------------------------------------------------

[](#incase-you-want-to-install-them-individually-follow-the-below-steps)

ESLint task Setup
-----------------

[](#eslint-task-setup)

1. Go to custom theme folder and add eslint package with npm

    ```
    npm install eslint --save-dev
    npm install eslint-config-airbnb --save-dev
    ```
2. Now run this command at project's root directory

    ```
    cp vendor/innoraft/drupal-quality-checker/eslintrc.json.dist .eslintrc.json
    ```

    For multisite run the following command

    ```
     cp vendor/innoraft/drupal-quality-checker/eslintrc.json.dist docroot/sites//themes/custom//.eslintrc.json
    ```
3. Update bin key for eslint task under grumphp.yml file with relative address to eslint's bin file.

    Example: if your theme name is `drupal_theme` then change it to `web/themes/custom/drupal_theme/node_modules/.bin/eslint`

Stylelint task Setup
--------------------

[](#stylelint-task-setup)

1. Go to custom theme folder and add stylelint package with npm

    ```
    npm install stylelint --save-dev
    ```
2. Now run this command at project's root directory

    ```
    cp vendor/innoraft/drupal-quality-checker/stylelintrc.json.dist .stylelintrc.json
    ```

    For multisite run the following command

    ```
     cp vendor/innoraft/drupal-quality-checker/stylelintrc.json.dist docroot/sites//themes/custom//.stylelintrc.json
    ```
3. For multisite run the following command

    ```
    npm install stylelint-config-standard
    ```
4. Update bin key for stylelint task under grumphp.yml file with relative address to stylelint's bin file.

    Example: if your theme name is `drupal_theme` then change it to `web/themes/custom/drupal_theme/node_modules/.bin/stylelint`

Trufflehog task Setup
---------------------

[](#trufflehog-task-setup)

1. Create a new folder `tasks` at project's root level.
2. Now run this command at project's root directory

    ```
    cp vendor/innoraft/drupal-quality-checker/tasks/SecurityLeaks.php tasks
    ```
3. Now add the following code in your `composer.json` file which is present at project's root directory. ( For reference you can check `composer.json` file of this package )

    ```
    "autoload": {
        "psr-4": {
            "Innoraft\\QualityChecker\\Trufflehog\\": "tasks"
        }
    },
    ```

    Once the code is added in `composer.json` then execute this command

    ```
    composer dump-autoload
    ```
4. Install `trufflehog` ( If not already install ). You can execute the following command to achieve the same.

    ```
    curl -sSfL https://raw.githubusercontent.com/trufflesecurity/trufflehog/main/scripts/install.sh | sh -s -- -b $HOME/.local/bin
    ```
5. Please check and confirm if your `grumphp.yml` is updated with `vendor/innoraft/drupal-quality-checker/grumphp.yml.dist` ( Check and confirm if trufflehog tasks &amp; service attribute is added in `grumphp.yml` file )
6. `Trufflehog` is now ready to sniff your secrets `:)`

###  Health Score

46

—

FairBetter than 92% of packages

Maintenance72

Regular maintenance activity

Popularity31

Limited adoption so far

Community22

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 63.6% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~198 days

Recently: every ~295 days

Total

7

Last Release

182d ago

Major Versions

1.0.3 → 2.0.02023-12-14

2.0.0 → 3.0.02024-10-30

### Community

Maintainers

![](https://www.gravatar.com/avatar/9212205cc317ebdf9213da90a2ab08c09dffe58a2e00819c5fe3083d8c76722f?d=identicon)[kunal-sin](/maintainers/kunal-sin)

---

Top Contributors

[![kunal-sin](https://avatars.githubusercontent.com/u/35484116?v=4)](https://github.com/kunal-sin "kunal-sin (21 commits)")[![hemuvyas](https://avatars.githubusercontent.com/u/58726792?v=4)](https://github.com/hemuvyas "hemuvyas (5 commits)")[![sandipta18](https://avatars.githubusercontent.com/u/122454028?v=4)](https://github.com/sandipta18 "sandipta18 (3 commits)")[![Souvik-Inno](https://avatars.githubusercontent.com/u/122255928?v=4)](https://github.com/Souvik-Inno "Souvik-Inno (1 commits)")[![kumareshinnoraft](https://avatars.githubusercontent.com/u/122453898?v=4)](https://github.com/kumareshinnoraft "kumareshinnoraft (1 commits)")[![kkmitra](https://avatars.githubusercontent.com/u/59031040?v=4)](https://github.com/kkmitra "kkmitra (1 commits)")[![Gaurav-gupta11](https://avatars.githubusercontent.com/u/125271500?v=4)](https://github.com/Gaurav-gupta11 "Gaurav-gupta11 (1 commits)")

---

Tags

drupalgithubgrumphpphpphpcsreactortrufflehogqualitygithooks

### Embed Badge

![Health badge](/badges/innoraft-drupal-quality-checker/health.svg)

```
[![Health](https://phpackages.com/badges/innoraft-drupal-quality-checker/health.svg)](https://phpackages.com/packages/innoraft-drupal-quality-checker)
```

###  Alternatives

[drupal/core-dev

require-dev dependencies from drupal/drupal; use in addition to drupal/core-recommended to run tests from drupal/core.

2023.2M367](/packages/drupal-core-dev)[phpstan/phpstan-doctrine

Doctrine extensions for PHPStan

67475.0M1.6k](/packages/phpstan-phpstan-doctrine)[shipmonk/dead-code-detector

Dead code detector to find unused PHP code via PHPStan extension. Can automatically remove dead PHP code. Supports libraries like Symfony, Doctrine, PHPUnit etc. Detects dead cycles. Can detect dead code that is tested.

5014.2M111](/packages/shipmonk-dead-code-detector)[ec-europa/toolkit

Toolkit packaged for Drupal projects based on Robo.

39255.4k37](/packages/ec-europa-toolkit)[youwe/testing-suite

Contains Youwe's default testing packages for php.

13195.6k8](/packages/youwe-testing-suite)[orrison/meliorstan

Provides PHPStan rules for improved code quality by detecting code smells and possible issues. In addition to enforcing particular naming and code style conventions to reduce bike-shedding.

1920.1k6](/packages/orrison-meliorstan)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
