@@ -16,22 +16,38 @@ repos:
1616
1717 - repo : local
1818 hooks :
19- - id : phpcbf
20- name : PHP Code Beautifier and Fixer
19+ - id : phpcbf-pure
20+ name : PHP Code Beautifier and Fixer (pure PHP files)
2121 entry : ./vendor/bin/phpcbf
22- args : [--standard=./.phpcs-ruleset.xml, --colors]
22+ args : [--standard=./.phpcs-ruleset-pure .xml, --colors]
2323 language : system
2424 files : \.php$
25- # exclude pure PHP files
2625 exclude : |
2726 (?x)^(
2827 test/.*|
2928 workers/.*|
3029 node_modules/.*|
3130 resources/lib/phpopenldaper/.*|
3231 vendor/.*|
33- resources/lib/.*|
32+ resources/templates/.*|
33+ resources/mail/.*|
34+ webroot/.*|
35+ )$
36+ - id : phpcbf-impure
37+ name : PHP Code Beautifier and Fixer (mixed PHP/HTML files)
38+ entry : ./vendor/bin/phpcbf
39+ args : [--standard=./.phpcs-ruleset-impure.xml, --colors]
40+ language : system
41+ files : |
42+ (?x)^(
43+ resources/templates/.*\.php|
3444 resources/mail/.*|
45+ webroot/.*\.php|
46+ )$
47+ # the user_flag_* templates use funky syntax and the formatter ruins them
48+ exclude : |
49+ (?x)^(
50+ resources/mail/user_flag_.*\.php|
3551 )$
3652
3753 - repo : https://github.com/rbubley/mirrors-prettier
@@ -68,22 +84,38 @@ repos:
6884
6985 - repo : local
7086 hooks :
71- - id : phpcs
72- name : PHP CodeSniffer
87+ - id : phpcs-pure
88+ name : PHP Code Sniffer (pure PHP files)
7389 entry : ./vendor/bin/phpcs
90+ args : [--standard=./.phpcs-ruleset-pure.xml, --colors, -s]
7491 language : system
7592 files : \.php$
76- args : [--standard=./.phpcs-ruleset.xml, --colors]
77- # exclude pure PHP files
7893 exclude : |
7994 (?x)^(
8095 test/.*|
8196 workers/.*|
8297 node_modules/.*|
8398 resources/lib/phpopenldaper/.*|
8499 vendor/.*|
85- resources/lib /.*|
100+ resources/templates /.*|
86101 resources/mail/.*|
102+ webroot/.*|
103+ )$
104+ - id : phpcs-impure
105+ name : PHP Code Sniffer (mixed PHP/HTML files)
106+ entry : ./vendor/bin/phpcs
107+ args : [--standard=./.phpcs-ruleset-impure.xml, --colors, -s]
108+ language : system
109+ files : |
110+ (?x)^(
111+ resources/templates/.*\.php|
112+ resources/mail/.*\.php|
113+ webroot/.*\.php|
114+ )$
115+ # the user_flag_* templates use funky syntax and the formatter ruins them
116+ exclude : |
117+ (?x)^(
118+ resources/mail/user_flag_.*\.php|
87119 )$
88120 - id : php-l
89121 name : php -l
0 commit comments