-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathphpcs.xml
82 lines (66 loc) · 3.13 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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
<?xml version="1.0"?>
<!-- Define a ruleset for WordPress Coding Standards. -->
<ruleset name="WordPress Coding Standards">
<file>./</file>
<!-- Exclude dependency-related files, generated files, and certain directories from scanning. -->
<exclude-pattern>*/tests/*</exclude-pattern> <!-- Exclude test directories. -->
<exclude-pattern>*/vendor/*</exclude-pattern> <!-- Exclude vendor directories. -->
<exclude-pattern>*/node_modules/*</exclude-pattern> <!-- Exclude node_modules directories. -->
<!-- Specify that only PHP files should be checked. -->
<arg name="extensions" value="php"/>
<!-- Show colors in the console. -->
<arg value="-colors"/>
<!-- Show progress and display error codes for each message (source). -->
<arg value="ps"/>
<!-- Strip the filepaths in reports down to the relevant bit. -->
<arg name="basepath" value="./"/>
<!-- Check up to 8 files simultaneously. -->
<arg name="parallel" value="8"/>
<!-- Define configuration settings. -->
<config name="minimum_supported_wp_version" value="5.8"/> <!-- Minimum supported WordPress version. -->
<config name="testVersion" value="7.0-"/> <!-- Test version. -->
<!-- Rule for PHPCompatibilityWP with exclusions. -->
<rule ref="PHPCompatibilityWP">
<exclude-pattern>tests/</exclude-pattern> <!-- Exclude test directories. -->
</rule>
<!-- Rule for WordPress with specific exclusions. -->
<rule ref="WordPress">
<!-- Exclude WordPress.Files.FileName as the plugin adheres to the PSR-4 standard. -->
<exclude name="WordPress.Files.FileName"/>
</rule>
<!-- Rule for WordPress Internationalization (I18n) with specific text domains. -->
<rule ref="WordPress.WP.I18n">
<properties>
<property name="text_domain" type="array" value="wp-ajaxify"/>
</properties>
</rule>
<!-- Rule for invalid class file names with exclusions. -->
<rule ref="WordPress.Files.FileName.InvalidClassFileName">
<exclude-pattern>includes/**/abstract-*.php</exclude-pattern> <!-- Exclude specific abstract class file names. -->
<exclude-pattern>tests/</exclude-pattern> <!-- Exclude test directories. -->
</rule>
<!-- Include the WordPress-Extra standard with exclusions. -->
<rule ref="WordPress-Extra">
<!-- Exclude specific rules here. For example, WordPress.PHP.DisallowShortTernary. -->
<exclude name="WordPress.PHP.DisallowShortTernary"/>
</rule>
<!-- Rule to check that everything is properly documented. -->
<rule ref="WordPress-Docs"/>
<!-- Rule for generic commenting with exclusions. -->
<rule ref="Generic.Commenting">
<exclude-pattern>tests/</exclude-pattern> <!-- Exclude test directories. -->
</rule>
<!-- Rule for validated and sanitized input with custom sanitizing functions. -->
<rule ref="WordPress.Security.ValidatedSanitizedInput">
<properties>
<property name="customSanitizingFunctions" type="array" value=""/>
</properties>
</rule>
<!-- Rule for escaping output with custom escaping functions. -->
<rule ref="WordPress.Security.EscapeOutput">
<properties>
<property name="customEscapingFunctions" type="array" value=""/>
</properties>
</rule>
</ruleset>
<!-- End of WordPress Coding Standards ruleset. -->