-
Notifications
You must be signed in to change notification settings - Fork 22
/
phpcs.xml.dist
89 lines (71 loc) · 2.87 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
<?xml version="1.0"?>
<ruleset name="PressForward">
<description>A custom set of PHPCS rules for PressForward PHP files.</description>
<!-- Exclude the Composer Vendor directory. -->
<exclude-pattern>/vendor/*</exclude-pattern>
<!-- Exclude any Node Modules directory. -->
<exclude-pattern>/node_modules/*</exclude-pattern>
<!-- Exclude Javascript and CSS files. -->
<exclude-pattern>*.js</exclude-pattern>
<exclude-pattern>*.css</exclude-pattern>
<!-- Exclude test files. -->
<exclude-pattern>/tests/</exclude-pattern>
<!-- Misc files that are not loaded in production -->
<exclude-pattern>Libraries/FiveFiltersReadability/examples/</exclude-pattern>
<exclude-pattern>modules/foo</exclude-pattern>
<!-- Do not scan built files. -->
<exclude-pattern>/build/</exclude-pattern>
<file>.</file>
<!-- Check for PHP cross-version compatibility. -->
<rule ref="PHPCompatibilityWP">
<config name="testVersion" value="5.7-"/>
</rule>
<!-- Include the WordPress-Extra standard. -->
<rule ref="WordPress">
<exclude name="WordPress.Files.FileName.InvalidClassFileName" />
<exclude name="WordPress.Files.FileName.NotHyphenatedLowercase" />
<exclude name="Universal.Arrays.DisallowShortArraySyntax.Found" />
<exclude name="WordPress.DB.SlowDBQuery.slow_db_query_tax_query" />
<exclude name="WordPress.DB.SlowDBQuery.slow_db_query_meta_query" />
<exclude name="WordPress.DB.SlowDBQuery.slow_db_query_meta_key" />
<exclude name="WordPress.DB.SlowDBQuery.slow_db_query_meta_value" />
<exclude-pattern>class-SplClassLoader.php</exclude-pattern>
<!-- Third-party libraries don't need to be scanned for coding standards -->
<exclude-pattern>Libraries/</exclude-pattern>
</rule>
<rule ref="WordPress.Security">
<exclude name="WordPress.Security.NonceVerification" />
</rule>
<rule ref="WordPress.WP.DeprecatedClasses">
<properties>
<property name="minimum_supported_version" value="5.1"/>
</properties>
</rule>
<rule ref="WordPress.WP.DeprecatedFunctions">
<properties>
<property name="minimum_supported_version" value="5.1"/>
</properties>
</rule>
<rule ref="WordPress.WP.DeprecatedParameters">
<properties>
<property name="minimum_supported_version" value="5.1"/>
</properties>
</rule>
<rule ref="WordPress.Utils.I18nTextDomainFixer">
<properties>
<property name="old_text_domain" type="array">
<element value="old-text-domain"/>
<element value="pf"/>
</property>
<property name="new_text_domain" value="pressforward" />
</properties>
</rule>
<rule ref="PEAR.NamingConventions.ValidClassName.Invalid">
<exclude-pattern>Controllers/PF_to_WP_Meta.php</exclude-pattern>
<exclude-pattern>Controllers/PF_to_WP_Posts.php</exclude-pattern>
<exclude-pattern>Controllers/PF_to_WP_System.php</exclude-pattern>
</rule>
<rule ref="Squiz.Commenting.FileComment.Missing">
<exclude-pattern>pressforward.php</exclude-pattern>
</rule>
</ruleset>