Skip to content

Instantly share code, notes, and snippets.

@walber-vaz
Created June 28, 2025 01:47
Show Gist options
  • Save walber-vaz/19b9ae08bdb2d80624bb1859b0127930 to your computer and use it in GitHub Desktop.
Save walber-vaz/19b9ae08bdb2d80624bb1859b0127930 to your computer and use it in GitHub Desktop.
Pre commit setup laravel/pint/larastan
default_install_hook_types:
- pre-commit
- commit-msg
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: check-yaml
- id: detect-aws-credentials
args: [ --allow-missing-credentials ]
- id: detect-private-key
- repo: https://github.com/compilerla/conventional-pre-commit
rev: v4.2.0
hooks:
- id: conventional-pre-commit
stages: [ commit-msg ]
args: [ ]
- repo: local
hooks:
- id: exec-laravel-pint
name: Laravel Pint - Code Formatter
language: system
entry: bash -c './vendor/bin/pint && git add -A'
types: [ php ]
always_run: true
pass_filenames: false
- id: exec-larastan
name: Laravel Stan - Static Analysis
language: system
entry: ./vendor/bin/phpstan analyze --error-format=table --no-progress
types: [ php ]
pass_filenames: false
always_run: true
- id: exec-php-test-parallel
name: PHP Test Parallel - Run Tests in Parallel
language: system
entry: php artisan test --parallel --stop-on-failure
types: [ php ]
pass_filenames: false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment