Repository navigation
Expand file tree
/
Copy pathphpcs.xml
More file actions
43 lines (38 loc) · 1.61 KB
/
Copy pathphpcs.xml
File metadata and controls
43 lines (38 loc) · 1.61 KB
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
<?xml version="1.0"?>
<ruleset name="10up PHPCS">
<description>10up PHPCS extended.</description>
<exclude-pattern>*/vendor-prefixed/*</exclude-pattern>
<rule ref="10up-Default">
<exclude name="WordPress.WP.GlobalVariablesOverride.Prohibited" />
<exclude name="WordPress.DB.SlowDBQuery" />
</rule>
<rule ref="PHPCompatibilityWP" />
<rule ref="WordPress.Security.NonceVerification.Recommended">
<exclude-pattern>/tests/*.php</exclude-pattern>
</rule>
<rule ref="WordPress.WP.DiscouragedFunctions.query_posts_query_posts">
<exclude-pattern>/tests/*.php</exclude-pattern>
</rule>
<rule ref="WordPress.WP.DiscouragedFunctions.wp_reset_query_wp_reset_query">
<exclude-pattern>/tests/*.php</exclude-pattern>
</rule>
<rule ref="WordPress.WP.PostsPerPage.posts_per_page_posts_per_page">
<exclude-pattern>/tests/*.php</exclude-pattern>
</rule>
<rule ref="WordPress.DB.DirectDatabaseQuery">
<exclude-pattern>/tests/*.php</exclude-pattern>
</rule>
<!-- PHPUnit tests: snake_case method names, a method-level @group on every test, kebab-case group names. -->
<rule ref="./tests/phpcs/ElasticPressTests" />
<rule ref="ElasticPressTests.Tests.MethodName">
<include-pattern>/tests/php/*</include-pattern>
</rule>
<rule ref="ElasticPressTests.Tests.Group">
<include-pattern>/tests/php/*</include-pattern>
</rule>
<!--
Prevent errors caused by WordPress Coding Standards not supporting PHP 8.0+.
See https://github.com/WordPress/WordPress-Coding-Standards/issues/2035
-->
<ini name="error_reporting" value="E_ALL & ~E_DEPRECATED" />
</ruleset>