Skip to content

matchory/pre-commit-laravel

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pre-commit-laravel

A pre-commit hook for Laravel.

This adds support for running Laravel Pint and Artisan Tests as pre-commit hooks in your Laravel project.

Usage

Using Laravel Pint with pre-commit

Add this to your .pre-commit-config.yaml:

- repo: https://github.com/matchory/pre-commit-laravel
  rev: v1.0.1
  hooks:
    - id: laravel-pint

Or, to disable automatic fixing:

- repo: https://github.com/matchory/pre-commit-laravel
  rev: v1.0.1
  hooks:
    - id: laravel-pint
      args: ["--test"]

Using Artisan tests with pre-commit

Add this to your .pre-commit-config.yaml:

- repo: https://github.com/matchory/pre-commit-laravel
  rev: v1.0.1
  hooks:
    - id: laravel-tests

Or, to enable parallel testing:

- repo: https://github.com/matchory/pre-commit-laravel
  rev: v1.0.1
  hooks:
    - id: laravel-tests
      args: ["--parallel"]

Note that this requires the brianium/paratest package to be installed in your project.

License

MIT

About

Pre-commit hooks for Laravel.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages