zeroc0d3lab/commit-checker

Check coding standard & code syntax with Git pre-commit hook.

1.0 2020-01-19 05:14 UTC

This package is not auto-updated.

Last update: 2024-04-23 16:45:54 UTC


README

Installation

composer require zeroc0d3lab/commit-checker

For version <= 5.4:

Add to section providers of config/app.php:

// config/app.php
'providers' => [
    ...
    Zerocod3lab\CommitChecker\Providers\CommitCheckerServiceProvider::class,
];

Publish configuration:

php artisan vendor:publish --provider="Zerocod3lab\CommitChecker\Providers\CommitCheckerServiceProvider" --tag=config

Install GIT hooks

php artisan git:install-hooks
  • Create default PSR config (It will be create phpcs.xml in your root project.).
php artisan git:create-phpcs
  • Run test manually (made sure that you've added all changed files to git stage)
php artisan git:pre-commit