dangthinh104/commit-checker

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

2.0.0 2022-05-04 06:52 UTC

This package is auto-updated.

Last update: 2024-05-04 11:25:19 UTC


README

Latest Version Software License Build Status

Installation

composer require dangthinh104/commit-checker

Publish the configuration:

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
  • Create default PHPMD config (It will create phpmd.xml in your root project).
php artisan git:create-phpmd
  • Run test manually (made sure you've added all changed files to git stage)
php artisan git:pre-commit
  • Run test manually PHPMD(default just check PSR2)
php artisan git:pre-commit --phpmd