PluginProbe
DesignSetGo / trunk
DesignSetGo vtrunk
2.7.3 2.7.1 2.7.2 2.7.0 2.6.3 2.6.2 2.6.1 2.6.0 2.5.1 2.4.1-test 2.5.0 2.4.0 2.3.0 2.2.0 2.1.2 2.1.1 2.1.0 trunk 1.0.1 1.1.0 1.1.1 1.1.2 1.1.3 1.1.4 1.2.0 All 67 releases
designsetgo / phpcs.xml

phpcs.xml in DesignSetGo trunk, at phpcs.xml

91 lines 3.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?xml version="1.0"?>
2 <ruleset name="DesignSetGo">
3 <description>DesignSetGo WordPress Coding Standards</description>
4
5 <!-- Files to check -->
6 <file>./designsetgo.php</file>
7 <file>./includes</file>
8
9 <!-- Exclude patterns -->
10 <exclude-pattern>*/vendor/*</exclude-pattern>
11 <exclude-pattern>*/node_modules/*</exclude-pattern>
12 <exclude-pattern>*/build/*</exclude-pattern>
13
14 <!-- Arguments -->
15 <arg value="sp"/>
16 <arg name="extensions" value="php"/>
17 <arg name="colors"/>
18
19 <!-- Rules -->
20 <rule ref="WordPress-Core">
21 <exclude name="WordPress.Files.FileName"/>
22 <exclude name="Generic.Arrays.DisallowShortArraySyntax"/>
23 </rule>
24
25 <rule ref="WordPress-Docs"/>
26
27 <rule ref="WordPress-Extra">
28 <exclude name="WordPress.Files.FileName"/>
29 </rule>
30
31 <!-- WordPress VIP platform coding standards -->
32 <rule ref="WordPressVIPMinimum">
33 <!-- Valid on activation/deactivation for rewrite rule cleanup -->
34 <exclude name="WordPressVIPMinimum.Functions.RestrictedFunctions.flush_rewrite_rules_flush_rewrite_rules"/>
35 <!-- HTTP_USER_AGENT read only in POST REST/ajax handlers; not subject to page caching -->
36 <exclude name="WordPressVIPMinimum.Variables.RestrictedVariables.cache_constraints___SERVER__HTTP_USER_AGENT__"/>
37 <!-- REMOTE_ADDR used only for server-side rate limiting; no viable client-side alternative -->
38 <exclude name="WordPressVIPMinimum.Variables.RestrictedVariables.cache_constraints___SERVER__REMOTE_ADDR__"/>
39 <!-- wp_mail is used for single transactional form emails, not bulk mail -->
40 <exclude name="WordPressVIPMinimum.Functions.RestrictedFunctions.wp_mail_wp_mail"/>
41 <!-- setcookie() used only in admin-facing draft-mode toggle endpoint; not subject to page caching -->
42 <exclude name="WordPressVIPMinimum.Functions.RestrictedFunctions.cookies_setcookie"/>
43 </rule>
44
45 <rule ref="WordPress.WP.I18n">
46 <properties>
47 <property name="text_domain" type="array">
48 <element value="designsetgo"/>
49 </property>
50 </properties>
51 </rule>
52
53 <rule ref="WordPress.Security"/>
54
55 <rule ref="WordPress.WhiteSpace.ControlStructureSpacing">
56 <properties>
57 <property name="blank_line_check" value="true"/>
58 </properties>
59 </rule>
60
61 <!-- Allow slash-separated hook names for namespacing -->
62 <rule ref="WordPress.NamingConventions.ValidHookName">
63 <properties>
64 <property name="additionalWordDelimiters" value="/"/>
65 </properties>
66 </rule>
67
68 <!-- Allow error_log() when wrapped in WP_DEBUG check -->
69 <rule ref="WordPress.PHP.DevelopmentFunctions">
70 <exclude name="WordPress.PHP.DevelopmentFunctions.error_log_error_log"/>
71 </rule>
72
73 <!-- Allow file_get_contents for local files only -->
74 <rule ref="WordPress.WP.AlternativeFunctions">
75 <properties>
76 <property name="exclude" value="file_get_contents"/>
77 </properties>
78 </rule>
79
80 <!-- Variables starting with _ are intentionally unused ($_ prefix convention) -->
81 <rule ref="VariableAnalysis.CodeAnalysis.VariableAnalysis">
82 <properties>
83 <property name="ignoreUnusedRegexp" value="/^_/"/>
84 </properties>
85 </rule>
86
87 <!-- Minimum PHP version -->
88 <config name="minimum_supported_wp_version" value="6.0"/>
89 <config name="testVersion" value="7.4-"/>
90 </ruleset>
91