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. innoraft/drupal-quality-checker

ActiveProject

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

Setups code quality checking tools for Drupal project.

3.0.0(1y ago)053.3k↓39.7%82MITShell

Since Nov 15Pushed 3mo 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 1mo ago

READMEChangelog (6)Dependencies (7)Versions (7)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.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NzIxNTIzOTAsIm5iZiI6MTc3MjE1MjA5MCwicGF0aCI6Ii8xMjI0NTQwMjgvMzUzNzE3NDE3LTdmZGI2YzJlLTg0M2ItNDRhOS05ZjI4LTA4ZThmMjQ3MGU4Zi5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjYwMjI3JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI2MDIyN1QwMDI4MTBaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT01ZmFjOWQzZjcwOTAwOTAyNmRkOWE0OWJkMDllNDkxMjE4OWJmOWYzNzJjYzg0ZjAxNWYzYzczZWY0NDg1ODBkJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.Fl-aXHlIhewCqfeRy2pkiZFesUmrfvO015bcZTD547E)](https://private-user-images.githubusercontent.com/122454028/353717417-7fdb6c2e-843b-44a9-9f28-08e8f2470e8f.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NzIxNTIzOTAsIm5iZiI6MTc3MjE1MjA5MCwicGF0aCI6Ii8xMjI0NTQwMjgvMzUzNzE3NDE3LTdmZGI2YzJlLTg0M2ItNDRhOS05ZjI4LTA4ZThmMjQ3MGU4Zi5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjYwMjI3JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI2MDIyN1QwMDI4MTBaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT01ZmFjOWQzZjcwOTAwOTAyNmRkOWE0OWJkMDllNDkxMjE4OWJmOWYzNzJjYzg0ZjAxNWYzYzczZWY0NDg1ODBkJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.Fl-aXHlIhewCqfeRy2pkiZFesUmrfvO015bcZTD547E)
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.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3Lmd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lMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI2MDIyN1QwMDI4MTBaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1jM2JhZWZiNmEzZWUzY2UwNGQ0NTkzMzA4OWQ5MmNiYTgzYjlkOTU2YzMwODIxMTQxYWIwNDFiOWQ3MjY5ODBhJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.0BsZkJQuzE_J2hPTvmtdRtMiv4Plfey6Yp73tPq2dUM)
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.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NzIxNTIzOTAsIm5iZiI6MTc3MjE1MjA5MCwicGF0aCI6Ii8xMjI0NTQwMjgvMzUzMzQ3MTc2LTkzMGZjZTYzLTUxYzgtNGZmMC05NTFjLTYxZGM4NjQ0YzFmOS5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjYwMjI3JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI2MDIyN1QwMDI4MTBaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT04ZWYzYzNkN2FkZDNiOWMzMTk0NTRhODFmN2U0M2JhNGVhYzdhYTM5YWM3NGI0ZDM2MTUxZWVlM2ZjMDhjNzM5JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.jBG7STVRtGzsfg_EQTGkLSuw_84WPTHqTeJr4qsazrk)](https://private-user-images.githubusercontent.com/122454028/353347176-930fce63-51c8-4ff0-951c-61dc8644c1f9.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NzIxNTIzOTAsIm5iZiI6MTc3MjE1MjA5MCwicGF0aCI6Ii8xMjI0NTQwMjgvMzUzMzQ3MTc2LTkzMGZjZTYzLTUxYzgtNGZmMC05NTFjLTYxZGM4NjQ0YzFmOS5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjYwMjI3JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI2MDIyN1QwMDI4MTBaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT04ZWYzYzNkN2FkZDNiOWMzMTk0NTRhODFmN2U0M2JhNGVhYzdhYTM5YWM3NGI0ZDM2MTUxZWVlM2ZjMDhjNzM5JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.jBG7STVRtGzsfg_EQTGkLSuw_84WPTHqTeJr4qsazrk)
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

43

—

FairBetter than 91% of packages

Maintenance62

Regular maintenance activity

Popularity30

Limited adoption so far

Community22

Small or concentrated contributor base

Maturity50

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 ~142 days

Recently: every ~178 days

Total

6

Last Release

565d 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

[captainhook/captainhook

PHP git hook manager

1.1k6.8M370](/packages/captainhook-captainhook)[bruli/php-git-hooks

Git hooks for PHP projects.

675370.8k5](/packages/bruli-php-git-hooks)[bernardosilva/git-hooks-php

Composer git-hook package with hooks for your php projects.

2516.7k1](/packages/bernardosilva-git-hooks-php)

PHPackages © 2026

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