-
Notifications
You must be signed in to change notification settings - Fork 5
/
phpcs.xml.dist
96 lines (79 loc) · 3.24 KB
/
phpcs.xml.dist
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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
<?xml version="1.0"?>
<ruleset name="WordPress Coding Standards based custom ruleset for your plugin">
<description>Generally-applicable sniffs for WordPress plugins.</description>
<rule ref="WordPress-Extra" />
<!-- Check all PHP files in directory tree by default. -->
<arg name="extensions" value="php"/>
<!-- What to scan -->
<file>.</file>
<!-- How to scan -->
<!-- Usage instructions: https://github.com/squizlabs/PHP_CodeSniffer/wiki/Usage -->
<!-- Annotated ruleset: https://github.com/squizlabs/PHP_CodeSniffer/wiki/Annotated-ruleset.xml -->
<!-- Show progress and sniff codes in all reports -->
<arg value="ps"/>
<!-- Strip the file paths down to the relevant bit -->
<arg name="basepath" value="./"/>
<arg name="colors"/>
<!-- Enables parallel processing when available for faster results. -->
<arg name="parallel" value="8"/>
<exclude-pattern>*/node_modules/*</exclude-pattern>
<exclude-pattern>*/vendor/*</exclude-pattern>
<exclude-pattern>*/tests/*</exclude-pattern>
<!-- Skip for third-party classes -->
<exclude-pattern>*/includes/class-noptin-emogrifier.php</exclude-pattern>
<exclude-pattern>*/includes/class-noptin-background-mailer.php</exclude-pattern>
<exclude-pattern>*/includes/emails/class-html-to-text.php</exclude-pattern>
<exclude-pattern>*/includes/assets/*</exclude-pattern>
<rule ref="Generic.WhiteSpace">
<exclude-pattern>*</exclude-pattern>
</rule>
<rule ref="PSR2.Classes.PropertyDeclaration">
<exclude-pattern>*</exclude-pattern>
</rule>
<rule ref="PSR2.Methods.MethodDeclaration">
<exclude-pattern>*</exclude-pattern>
</rule>
<rule ref="Generic.Commenting">
<exclude-pattern>*</exclude-pattern>
</rule>
<rule ref="Squiz.Commenting">
<exclude-pattern>*</exclude-pattern>
</rule>
<rule ref="Internal.NoCodeFound">
<exclude-pattern>*</exclude-pattern>
</rule>
<rule ref="Generic.Formatting.MultipleStatementAlignment.IncorrectWarning">
<exclude-pattern>*</exclude-pattern>
</rule>
<!-- Rules: WordPress Coding Standards -->
<!-- https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards -->
<!-- https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/wiki/Customizable-sniff-properties -->
<config name="minimum_supported_wp_version" value="6.4"/>
<rule ref="WordPress"/>
<rule ref="WordPress.NamingConventions">
<exclude-pattern>*</exclude-pattern>
</rule>
<rule ref="WordPress.Files.FileName">
<exclude-pattern>*</exclude-pattern>
</rule>
<rule ref="WordPress.WP.I18n">
<properties>
<!-- Value: replace the text domain used. -->
<property name="text_domain" type="array" value="newsletter-optin-box"/>
</properties>
</rule>
<rule ref="WordPress.WhiteSpace.ControlStructureSpacing">
<properties>
<property name="blank_line_check" value="true"/>
</properties>
</rule>
<!--
#############################################################################
USE THE PHPCompatibility RULESET
#############################################################################
-->
<!-- https://github.com/PHPCompatibility/PHPCompatibility#sniffing-your-code-for-compatibility-with-specific-php-versions -->
<config name="testVersion" value="7.2-"/>
<!-- https://github.com/PHPCompatibility/PHPCompatibilityWP -->
<rule ref="PHPCompatibilityWP"/>
</ruleset>