-
Notifications
You must be signed in to change notification settings - Fork 10
/
phpcs.xml
54 lines (50 loc) · 2.54 KB
/
phpcs.xml
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
<?xml version="1.0"?>
<ruleset name="WordPress Coding Standards">
<!-- See https://github.com/squizlabs/PHP_CodeSniffer/wiki/Annotated-ruleset.xml -->
<!-- See https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/blob/develop/WordPress-Core/ruleset.xml -->
<!-- See https://github.com/woocommerce/woocommerce/blob/master/phpcs.xml -->
<description>WooCommerce dev PHP_CodeSniffer ruleset.</description>
<!-- Exclude paths -->
<exclude-pattern>*/vendor/*</exclude-pattern>
<exclude-pattern>*/tests/unit/*</exclude-pattern>
<exclude-pattern>*/tests/woocommerce/*</exclude-pattern>
<exclude-pattern>*/lib/Plugin/*</exclude-pattern>
<!-- Configs -->
<config name="minimum_supported_wp_version" value="4.7" />
<config name="testVersion" value="5.2-"/>
<!-- Rules -->
<rule ref="WordPress">
<exclude name="WordPress.VIP.DirectDatabaseQuery.NoCaching" />
<exclude name="WordPress.VIP.DirectDatabaseQuery.SchemaChange" />
<exclude name="WordPress.VIP.FileSystemWritesDisallow.file_ops_fwrite" />
<exclude name="WordPress.VIP.OrderByRand" />
<exclude name="WordPress.VIP.RestrictedFunctions" />
<exclude name="WordPress.VIP.RestrictedVariables.user_meta__wpdb__usermeta" />
<exclude name="WordPress.VIP.PostsPerPage.posts_per_page_posts_per_page" />
<exclude name="WordPress.WP.I18n.MissingTranslatorsComment" />
</rule>
<rule ref="WordPress.VIP.ValidatedSanitizedInput">
<properties>
<property name="customSanitizingFunctions" type="array" value="wc_clean,wc_sanitize_tooltip,wc_format_decimal,wc_stock_amount,wc_sanitize_permalink" />
</properties>
</rule>
<rule ref="WordPress.WP.I18n">
<properties>
<property name="text_domain" type="array" value="woocommerce-gateway-ebanx" />
</properties>
</rule>
<rule ref="WordPress.Files.FileName.InvalidClassFileName">
<exclude-pattern>tests/*</exclude-pattern>
</rule>
<rule ref="Generic.Commenting">
<exclude-pattern>tests/</exclude-pattern>
<exclude name="Generic.Commenting.DocComment.MissingShort" />
</rule>
<rule ref="Squiz.Commenting">
<exclude name="Squiz.Commenting.LongConditionClosingComment" />
<exclude name="Squiz.Commenting.PostStatementComment" />
<exclude name="Squiz.Commenting.FileComment" />
<exclude name="Squiz.Commenting.FunctionComment.MissingParamComment" />
</rule>
<rule ref="PEAR.Functions.FunctionCallSignature.EmptyLine" />
</ruleset>