wpcmf / git-commit-checker
Check coding standard & code syntax with Git pre-commit hook.
1.0
2022-04-11 05:48 UTC
Requires
- php: ^7.1.3|^8.0
- laravel/framework: ^5.6|^6|^7|^8
- php-parallel-lint/php-parallel-lint: ^1.0
- squizlabs/php_codesniffer: ^3.3
Requires (Dev)
- phpunit/phpunit: ^6.1|^7.0|^8.0
This package is not auto-updated.
Last update: 2024-05-08 09:17:46 UTC
README
Installation
composer require wpcmf/git-commit-checker
For version <= 5.4:
Add to section providers
of config/app.php
:
// config/app.php
'providers' => [
...
Wpcmf\GitCommitChecker\Providers\GitCommitCheckerServiceProvider::class,
];
Publish the configuration:
php artisan vendor:publish --provider="Wpcmf\GitCommitChecker\Providers\GitCommitCheckerServiceProvider" --tag=config
Install GIT hooks
php artisan git:install-hooks
- Create default PSR config (It will create phpcs.xml in your root project).
php artisan git:create-phpcs
- Run test manually (made sure you've added all changed files to git stage)
php artisan git:pre-commit