PluginProbe
Machete / 5.0
Machete v5.0
5.3 trunk 3.5.1 4.0 4.0.1 4.0.2 4.0.3 5.0 5.0.1 5.1 5.2
machete / phpcs.xml

phpcs.xml in Machete 5.0, at phpcs.xml

77 lines 2.3 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="machete">
3 <description>A custom set of rules to check for a WPized WordPress project</description>
4
5 <arg name="colors"/>
6 <arg name="parallel" value="100"/>
7 <arg name="extensions" value="php"/>
8
9 <!-- Exclude WP Core folders and files from being checked. -->
10 <!--
11 <exclude-pattern>/docroot/wp-admin/*</exclude-pattern>
12 <exclude-pattern>/docroot/wp-includes/*</exclude-pattern>
13 <exclude-pattern>/docroot/wp-*.php</exclude-pattern>
14 <exclude-pattern>/docroot/index.php</exclude-pattern>
15 <exclude-pattern>/docroot/xmlrpc.php</exclude-pattern>
16 <exclude-pattern>/docroot/wp-content/plugins/*</exclude-pattern>
17 -->
18
19 <!-- Exclude the Composer Vendor directory. -->
20 <exclude-pattern>/vendor/*</exclude-pattern>
21
22 <!-- Exclude the Node Modules directory. -->
23 <exclude-pattern>/node_modules/*</exclude-pattern>
24
25 <!-- Exclude minified Javascript files. -->
26 <exclude-pattern>*.min.js</exclude-pattern>
27
28 <!-- Include the WordPress-Core standard. -->
29 <rule ref="WordPress-Core" />
30
31 <!-- Include the WordPress-Extra standard. -->
32 <rule ref="WordPress-Extra" />
33
34 <!-- Let's also check that everything is properly documented. -->
35 <rule ref="WordPress-Docs"/>
36
37 <!-- Add in some extra rules from other standards. -->
38 <rule ref="Generic.CodeAnalysis.UnusedFunctionParameter"/>
39 <!-- <rule ref="Generic.Commenting.Todo"/> -->
40
41 <!-- Check for PHP cross-version compatibility. -->
42 <!--
43 To enable this, the PHPCompatibility standard needs
44 to be installed.
45 See the readme for installation instructions:
46 https://github.com/wimg/PHPCompatibility
47 -->
48
49 <config name="testVersion" value="8.2"/>
50 <rule ref="PHPCompatibility"/>
51
52
53 <!--
54 To get the optimal benefits of using WPCS, we should add a couple of
55 custom properties.
56 Adjust the values of these properties to fit our needs.
57
58 For information on additional custom properties available, check out
59 the wiki:
60 https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/wiki/Customizable-sniff-properties
61 -->
62 <config name="minimum_supported_wp_version" value="4.6"/>
63
64 <rule ref="WordPress.WP.I18n">
65 <properties>
66 <property name="text_domain" type="array" value="machete"/>
67 </properties>
68 </rule>
69
70 <rule ref="WordPress.NamingConventions.PrefixAllGlobals">
71 <properties>
72 <property name="prefixes" type="array" value="machete"/>
73 </properties>
74 </rule>
75
76 </ruleset>
77