Skip to content

LaurenceRawlings/pre-commit-hooks

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Pre-Commit Hooks

Various custom pre-commit hooks.

Hooks

Usage

Add the code blocks below to your .pre-commit-config.yaml file.

Laravel

Adds support for running Laravel Pint and Artisan Tests as pre-commit hooks in a Laravel project. Includes support for projects using Laravel Sail.

Pint

- repo: https://github.com/LaurenceRawlings/pre-commit-hooks
  rev: v1.0.0
  hooks:
    - id: laravel-pint
      args: ["--test"] # disables automatic fixing

Tests

- repo: https://github.com/LaurenceRawlings/pre-commit-hooks
  rev: v1.0.0
  hooks:
    - id: laravel-test
      args: ["--parallel"] # enables parallel testing

Parallel testing requires brianium/paratest