Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Copied hooks.yaml to .pre-commit-hooks.yaml per pre-commit project changes #21

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions .pre-commit-hooks.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
- id: php-lint-all
name: PHP Syntax Check (Comprehensive)
description: Check PHP Syntax on ALL PHP staged files with user friendly messages and colors
entry: pre_commit_hooks/php-lint.sh
language: script
files: \.php$
args: [-s all]

- id: php-lint
name: PHP Syntax Check (Quick)
description: Runs php -l on all staged files. Exits when it hits the first errored file
entry: php -l
language: system
files: \.php$

- id: php-unit
name: PHP Unit
description: Run the full php unit test. Checks which PHPUnit executable is available first and then runs it. Preference order is vendor/bin, phpunit and phpunit.phar.
entry: pre_commit_hooks/php-unit.sh
language: script
files: \.php$

- id: php-cs
name: PHP Codesniffer
description: Run php codesniffer against all staged files.
entry: pre_commit_hooks/php-cs.sh
language: script
files: \.php$

- id: php-cbf
name: PHP Codesniffer (Code Beutifier and Formatter)
description: Run php codesniffer against all staged files.
entry: pre_commit_hooks/php-cbf.sh
language: script
files: \.php$

- id: php-cs-fixer
name: PHP Coding Standards Fixer
description: Run php coding standards fixer against all staged files.
entry: pre_commit_hooks/php-cs-fixer.sh
language: script
files: \.php$