Download the PHP package dallask/all-in-one-code-checker without Composer
On this page you can find all versions of the php package dallask/all-in-one-code-checker. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package all-in-one-code-checker
Drupal Code Quality Checker
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
-
Run
composer require dallask/all-in-one-code-checker
-
Copy
grumphp.yml
in project's root directory (not Drupal root directory) withgrumphp.yml.dist
-
Adjust config in
grumphp.yml
-
Run
npm init
(optional) -
Run
npm install dallask-all-in-one-code-checker
- 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
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.
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
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):
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
- To start from CLI use
./vendor/bin/grumphp run
. It will check only files added bygit add
. - Just follow GrumPHP documentation
All versions of all-in-one-code-checker with dependencies
drupal/coder Version ^8.3
php-parallel-lint/php-parallel-lint Version ^1.3
ergebnis/composer-normalize Version ^2.15
phpro/grumphp Version ^1.4
phpmd/phpmd Version ^2.10
space48/grumphp-stylelint-task Version ^1.0
dallask/grumphp-prettier-task Version ^1.0