PHPackages                             dallask/all-in-one-code-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. [Utility &amp; Helpers](/categories/utility)
4. /
5. dallask/all-in-one-code-checker

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

dallask/all-in-one-code-checker
===============================

1.0.1(4y ago)03.7k

Since Sep 27Pushed 4y ago1 watchersCompare

[ Source](https://github.com/dallask/all-in-one-code-checker)[ Packagist](https://packagist.org/packages/dallask/all-in-one-code-checker)[ RSS](/packages/dallask-all-in-one-code-checker/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (2)Dependencies (8)Versions (3)Used By (0)

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

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

---

Overview
--------

[](#overview)

Provides set of libraries to easily setup code quality checks based on [GrumPHP](https://github.com/phpro/grumphp) for Drupal module/theme/profile. Check out this [Lullabot article](https://www.lullabot.com/articles/how-enforce-drupal-coding-standards-git) for more details.

> *Note:* This library aim to help contributed/custom Drupal module/theme/profile hosted in individual git repository.

Install
-------

[](#install)

1. Run `composer require dallask/all-in-one-code-checker`
2. Copy `grumphp.yml` in project's root directory (not Drupal root directory) with `grumphp.yml.dist`
3. Adjust config in `grumphp.yml`
4. Run `npm init` (optional)
5. Run `npm install dallask-all-in-one-code-checker`
6. If you do not see needed scripts in your package.json file, just copy them from file: ./node\_modules/dallask-all-in-one-code-checker/package.json

```
"scripts": {
    "grumphp": "./vendor/bin/grumphp run",
        "phpcs:total": "./vendor/bin/phpcs --standard=Drupal --extensions=php,module,inc,install,test,profile .",
        "phpcs:current": "./vendor/bin/phpcs --standard=Drupal --extensions=php,module,inc,install,test,profile $(git diff --name-status | grep -v \"^[RD]\" | awk '{ print $2 }')",
        "phpcs:total:fix": "./vendor/bin/phpcbf --standard=Drupal --extensions=php,module,inc,install,test,profile .",
        "phpcs:current:fix": "./vendor/bin/phpcbf --standard=Drupal --extensions=php,module,inc,install,test,profile $(git diff --name-status | grep -v \"^[RD]\" | awk '{ print $2 }')",
        "stylelint:total": "stylelint '**/*.scss'",
        "stylelint:current": "stylelint $(git diff --name-status | grep '\\.scss$' | grep -v \"^[RD]\" | awk '{ print $2 }')",
        "stylelint:total:fix": "stylelint '**/*.scss' --fix",
        "stylelint:current:fix": "stylelint --fix $(git diff --name-status | grep '\\.scss$' | grep -v \"^[RD]\" | awk '{ print $2 }')",
        "prettier:total": "prettier '**/*' --check",
        "prettier:current": "prettier --check $(git diff --name-status | grep '\\.scss$\\|\\.js$' | grep -v \"^[RD]\" | awk '{ print $2 }')",
        "prettier:total:fix": "prettier '**/*' --write",
        "prettier:current:fix": "prettier --write $(git diff --name-status | grep '\\.scss$\\|\\.js$' | grep -v \"^[RD]\" | awk '{ print $2 }')",
        "eslint:total": "eslint '**/*.js'",
        "eslint:current": "eslint $(git diff --name-status | grep '\\.js$' | grep -v \"^[RD]\" | awk '{ print $2 }')",
        "eslint:total:fix": "eslint '**/*.js' --fix",
        "eslint:current:fix": "eslint --fix $(git diff --name-status | grep '\\.js$' | grep -v \"^[RD]\" | awk '{ print $2 }')"
   }

```

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.

Features
--------

[](#features)

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. [PHP Copy/Paste Detector (CPD)](https://github.com/sebastianbergmann/phpcpd)

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

NPM Scripts
-----------

[](#npm-scripts)

You can use next scripts to check and fix your files:

```
grumphp - total grumphp check according to your grumphp.yml config

PHPCS:
phpcs:total - total phpcs check for all project files
phpcs:total:fix - total phpcbf fix for all project files
phpcs:current - phpcs check for project files that were changed
phpcs:current:fix - phpcbf fix for project files that were changed

Stylelint:
stylelint:total - stylelint check for all project files
stylelint:total:fix - stylelint fix for all project files
stylelint:current - stylelint check for project files that were changed
stylelint:current:fix - stylelint fix for project files that were changed

Prettier:
prettier:total - prettier check for all project files
prettier:total:fix - prettier fix for all project files
prettier:current - prettier check for project files that were changed
prettier:current:fix - prettier fix for project files that were changed

ESLint:
eslint:total - eslint check for all project files
eslint:total:fix - eslint fix for all project files
eslint:current - eslint check for project files that were changed
eslint:current:fix - prettier fix for project files that were changed

Just run `npm run script_name` in root directory.

```

Composer scripts
----------------

[](#composer-scripts)

You can use next composer scripts to check and fix your files (just copy them from the composer.json file to your project composer.json and modify options if it needed):

```
"scripts": {
        "post-install-cmd": [
            "npm install"
        ],
        "post-update-cmd": [
            "npm install"
        ],
        "grumphp": "./vendor/bin/grumphp run",
        "phpcs:total": "./vendor/bin/phpcs --standard=Drupal --extensions=php,module,inc,install,test,profile .",
        "phpcs:current": "./vendor/bin/phpcs --standard=Drupal --extensions=php,module,inc,install,test,profile $(git diff --name-status | grep -v \"^[RD]\" | awk '{ print $2 }')",
        "phpcs:total:fix": "./vendor/bin/phpcbf --standard=Drupal --extensions=php,module,inc,install,test,profile .",
        "phpcs:current:fix": "./vendor/bin/phpcbf --standard=Drupal --extensions=php,module,inc,install,test,profile $(git diff --name-status | grep -v \"^[RD]\" | awk '{ print $2 }')",
        "stylelint:total": "./node_modules/.bin/stylelint '**/*.scss'",
        "stylelint:current": "./node_modules/.bin/stylelint $(git diff --name-status | grep '\\.scss$' | grep -v \"^[RD]\" | awk '{ print $2 }')",
        "stylelint:total:fix": "./node_modules/.bin/stylelint '**/*.scss' --fix",
        "stylelint:current:fix": "./node_modules/.bin/stylelint --fix $(git diff --name-status | grep '\\.scss$' | grep -v \"^[RD]\" | awk '{ print $2 }')",
        "prettier:total": "./node_modules/.bin/prettier '**/*' --check",
        "prettier:current": "./node_modules/.bin/prettier --check $(git diff --name-status | grep '\\.scss$\\|\\.js$' | grep -v \"^[RD]\" | awk '{ print $2 }')",
        "prettier:total:fix": "./node_modules/.bin/prettier '**/*' --write",
        "prettier:current:fix": "./node_modules/.bin/prettier --write $(git diff --name-status | grep '\\.scss$\\|\\.js$' | grep -v \"^[RD]\" | awk '{ print $2 }')",
        "eslint:total": "./node_modules/.bin/eslint '**/*.js'",
        "eslint:current": "./node_modules/.bin/eslint $(git diff --name-status | grep '\\.js$' | grep -v \"^[RD]\" | awk '{ print $2 }')",
        "eslint:total:fix": "./node_modules/.bin/eslint '**/*.js' --fix",
        "eslint:current:fix": "./node_modules/.bin/eslint --fix $(git diff --name-status | grep '\\.js$' | grep -v \"^[RD]\" | awk '{ print $2 }')"
    }

```

```
grumphp - total grumphp check according to your grumphp.yml config

PHPCS:
phpcs:total - total phpcs check for all project files
phpcs:total:fix - total phpcbf fix for all project files
phpcs:current - phpcs check for project files that were changed
phpcs:current:fix - phpcbf fix for project files that were changed

Stylelint:
stylelint:total - stylelint check for all project files
stylelint:total:fix - stylelint fix for all project files
stylelint:current - stylelint check for project files that were changed
stylelint:current:fix - stylelint fix for project files that were changed

Prettier:
prettier:total - prettier check for all project files
prettier:total:fix - prettier fix for all project files
prettier:current - prettier check for project files that were changed
prettier:current:fix - prettier fix for project files that were changed

ESLint:
eslint:total - eslint check for all project files
eslint:total:fix - eslint fix for all project files
eslint:current - eslint check for project files that were changed
eslint:current:fix - prettier fix for project files that were changed

Just run `composer run-script script_name` in root directory.

```

Usage
-----

[](#usage)

- To start from CLI use `./vendor/bin/grumphp run`. It will check only files added by `git add`.
- Just follow [GrumPHP](https://github.com/phpro/grumphp) documentation

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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 ~13 days

Total

2

Last Release

1675d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/9831186bf7ab1d26dc23f995349d5c219df306ed9f9b3e02c9cb6cb276a09f22?d=identicon)[dallask](/maintainers/dallask)

---

Top Contributors

[![ievgenky](https://avatars.githubusercontent.com/u/68694560?v=4)](https://github.com/ievgenky "ievgenky (10 commits)")

### Embed Badge

![Health badge](/badges/dallask-all-in-one-code-checker/health.svg)

```
[![Health](https://phpackages.com/badges/dallask-all-in-one-code-checker/health.svg)](https://phpackages.com/packages/dallask-all-in-one-code-checker)
```

###  Alternatives

[acquia/orca

A tool for testing a company's software packages together in the context of a realistic, functioning, best practices Drupal build

32902.4k](/packages/acquia-orca)[axelerant/drupal-quality-checker

Code quality checking tools for Drupal project.

13197.9k1](/packages/axelerant-drupal-quality-checker)[ec-europa/toolkit

Toolkit packaged for Drupal projects based on Robo.

38244.6k16](/packages/ec-europa-toolkit)[youwe/testing-suite

Contains Youwe's default testing packages for php.

13176.9k8](/packages/youwe-testing-suite)[lasselehtinen/laravel-conventions-checker

grumphp config to automatically check conventions for Laravel projects

2210.4k4](/packages/lasselehtinen-laravel-conventions-checker)

PHPackages © 2026

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