PluginProbe
WPIDE – File Manager & Code Editor / 3.4.7
WPIDE – File Manager & Code Editor v3.4.7
3.5.9 3.5.8 3.5.7 2.0.14 2.0.15 2.0.16 2.0.2 2.0.4 2.0.5 2.0.6 2.0.7 2.0.8 2.0.9 2.1 2.2 2.3 2.3.1 2.3.2 2.4.0 2.5 2.6 3.0 3.1 3.2 3.3 All 55 releases
wpide / freemius / phpcs.xml

phpcs.xml in WPIDE – File Manager & Code Editor 3.4.7, at freemius/phpcs.xml

126 lines 4.6 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 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="Freemius WordPress SDK"
3 xsi:noNamespaceSchemaLocation="https://raw.githubusercontent.com/squizlabs/PHP_CodeSniffer/master/phpcs.xsd">
4
5 <description>A custom set of rules to check for a WPized WordPress project</description>
6
7 <!--
8 #############################################################################
9 COMMAND LINE ARGUMENTS
10 https://github.com/squizlabs/PHP_CodeSniffer/wiki/Annotated-Ruleset
11 #############################################################################
12 -->
13
14 <file>.</file>
15
16 <!-- Exclude the Composer Vendor directory. -->
17 <exclude-pattern>/vendor/*</exclude-pattern>
18
19 <!-- Exclude the Node Modules directory. -->
20 <exclude-pattern>/node_modules/*</exclude-pattern>
21
22 <!-- Exclude front-end asset files. -->
23 <exclude-pattern>/assets/*</exclude-pattern>
24
25 <!-- Exclude language files. -->
26 <exclude-pattern>/languages/*</exclude-pattern>
27 <exclude-pattern>/includes/class-freemius.php</exclude-pattern>
28
29 <!-- Strip the filepaths down to the relevant bit. -->
30 <arg name="basepath" value="."/>
31
32 <!-- Check up to 8 files simultaneously. -->
33 <arg name="parallel" value="8"/>
34
35 <arg name="extensions" value="php"/>
36
37 <arg name="tab-width" value="4"/>
38
39 <!--
40 #############################################################################
41 SET UP THE RULESETS
42 #############################################################################
43 -->
44
45 <!-- Include only the security related sniffs for now -->
46 <rule ref="WordPress.Security.EscapeOutput">
47 <properties>
48 <property name="customEscapingFunctions" type="array">
49 <element value="fs_html_get_attributes"/>
50 <element value="fs_html_get_classname"/>
51 <element value="fs_html_get_sanitized_html"/>
52 <element value="fs_esc_attr"/>
53 <element value="fs_esc_attr_inline"/>
54 <element value="fs_esc_attr_x_inline"/>
55 <element value="htmlspecialchars"/>
56 <element value="fs_esc_html_inline"/>
57 </property>
58 <property name="customAutoEscapedFunctions" type="array">
59 <element value="fs_nonce_url" />
60 <element value="WP_FS__ADDRESS" />
61 </property>
62 </properties>
63 </rule>
64
65 <!-- Encourage use of wp_safe_redirect() to avoid open redirect vulnerabilities.
66 https://github.com/WordPress/WordPress-Coding-Standards/pull/1264 -->
67 <rule ref="WordPress.Security.SafeRedirect"/>
68
69 <!-- Verify that a nonce check is done before using values in superglobals.
70 https://github.com/WordPress/WordPress-Coding-Standards/issues/73 -->
71 <rule ref="WordPress.Security.NonceVerification">
72 <properties>
73 <property name="customNonceVerificationFunctions" type="array">
74 <element value="check_ajax_referer"/>
75 </property>
76 </properties>
77 </rule>
78
79 <!-- Let's also check that everything is properly documented. -->
80 <!-- <rule ref="WordPress-Docs"/>-->
81
82 <!-- Add in some extra rules from other standards. -->
83 <!-- <rule ref="Generic.CodeAnalysis.UnusedFunctionParameter"/>-->
84 <!-- <rule ref="Generic.Commenting.Todo"/>-->
85
86 <!-- Check for PHP cross-version compatibility. -->
87 <!--
88 To enable this, the PHPCompatibilityWP standard needs
89 to be installed.
90 See the readme for installation instructions:
91 https://github.com/PHPCompatibility/PHPCompatibilityWP
92 For more information, also see:
93 https://github.com/PHPCompatibility/PHPCompatibility
94 -->
95 <!--
96 <config name="testVersion" value="5.2-"/>
97 <rule ref="PHPCompatibilityWP"/>
98 -->
99
100
101 <!--
102 #############################################################################
103 SNIFF SPECIFIC CONFIGURATION
104 #############################################################################
105 -->
106
107 <!--
108 To get the optimal benefits of using WPCS, we should add a couple of
109 custom properties.
110 Adjust the values of these properties to fit our needs.
111
112 For information on additional custom properties available, check out
113 the wiki:
114 https://github.com/WordPress/WordPress-Coding-Standards/wiki/Customizable-sniff-properties
115 -->
116 <config name="minimum_supported_wp_version" value="5.0"/>
117
118 <rule ref="WordPress.NamingConventions.PrefixAllGlobals">
119 <properties>
120 <property name="prefixes" type="array">
121 <element value="fs"/>
122 </property>
123 </properties>
124 </rule>
125
126 </ruleset>