-
Notifications
You must be signed in to change notification settings - Fork 47
/
phpcs.xml
43 lines (30 loc) · 1.45 KB
/
phpcs.xml
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
<?xml version="1.0"?>
<ruleset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="Example Project" xsi:noNamespaceSchemaLocation="https://raw.githubusercontent.com/squizlabs/PHP_CodeSniffer/master/phpcs.xsd">
<description>A custom set of rules to check for the Restricted Site Access project.</description>
<arg name="extensions" value="php"/>
<!-- Exclude the Composer Vendor directory. -->
<exclude-pattern>/vendor/*</exclude-pattern>
<exclude-pattern>/10up-lib/*</exclude-pattern>
<!-- Exclude the Node Modules directory. -->
<exclude-pattern>/node_modules/*</exclude-pattern>
<!-- Exclude minified Javascript files. -->
<exclude-pattern>*.min.js</exclude-pattern>
<!-- Exclude the assets directory. -->
<exclude-pattern>assets</exclude-pattern>
<exclude-pattern>tests/php/bootstrap.php</exclude-pattern>
<!-- Let's also check that everything is properly documented. -->
<rule ref="WordPress">
<exclude name="WordPress.NamingConventions.ValidVariableName.VariableNotSnakeCase" />
</rule>
<rule ref="Squiz.Commenting.FileComment.Missing">
<exclude-pattern>tests</exclude-pattern>
</rule>
<rule ref="Squiz.Commenting.ClassComment.Missing">
<exclude-pattern>tests</exclude-pattern>
</rule>
<rule ref="Squiz.Commenting.FunctionComment.Missing">
<exclude-pattern>tests</exclude-pattern>
</rule>
<!-- Add in some extra rules from other standards. -->
<config name="minimum_supported_wp_version" value="5.7"/>
</ruleset>