forked from hootsuite/pre-commit-php
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy path.pre-commit-hooks.yaml
70 lines (61 loc) · 2.02 KB
/
.pre-commit-hooks.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
- 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 phpunit.phar, vendor/bin/phpunit, phpunit and bin/phpunit.
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$
- 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$
- id: php-no-dumps
name: PHP Ensure no dumps
descriptions: Checks for a call to symfony's dump
entry: \s+dump\(|;dump\(|^dump\(
language: pcre
files: \.php$
- id: php-no-var_dumps
name: PHP Ensure no var_dumps
descriptions: Checks for var_dump calls
entry: \s+var_dump\(|;var_dump\(|^var_dump\(
language: pcre
files: \.php$
- id: php-no-exits
name: PHP Ensure no exits or dies
descriptions: Checks for die and exit calls
entry: \s+exit[;(]|;exit[;(]|^exit[;(]|\s+die[;(]|;die[;(]|^die[;(]
language: pcre
files: \.php$