-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathphpcs.xml.dist
More file actions
52 lines (41 loc) · 1.96 KB
/
phpcs.xml.dist
File metadata and controls
52 lines (41 loc) · 1.96 KB
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
<?xml version="1.0"?>
<ruleset name="WordPress Plugin Boilerplate Coding Standards">
<description>Coding standards for WordPress Plugin Boilerplate</description>
<!-- Check all PHP files in directory tree by default. -->
<arg name="extensions" value="php"/>
<file>.</file>
<!-- Show progress and sniff codes in all reports -->
<arg value="ps"/>
<!-- Exclude paths -->
<exclude-pattern>*/vendor/*</exclude-pattern>
<exclude-pattern>*/node_modules/*</exclude-pattern>
<exclude-pattern>*/build/*</exclude-pattern>
<!-- Include the WordPress-Extra standard. -->
<rule ref="WordPress-Extra">
<!-- We are ok with version in file headers -->
<exclude name="Squiz.Commenting.FileComment.MissingPackageTag"/>
<exclude name="Squiz.Commenting.FileComment.WrongStyle"/>
<exclude name="Squiz.Commenting.ClassComment.Missing"/>
<exclude name="Squiz.Commenting.FunctionComment.MissingParamComment"/>
<exclude name="Generic.Commenting.DocComment.MissingShort"/>
<!-- Allow short array syntax -->
<exclude name="Generic.Arrays.DisallowShortArraySyntax"/>
</rule>
<!-- Let's also check that everything is properly documented. -->
<rule ref="WordPress-Docs"/>
<!-- Add in some extra rules from other standards. -->
<rule ref="Generic.CodeAnalysis.UnusedFunctionParameter"/>
<rule ref="Generic.Commenting.Todo"/>
<!-- Check for PHP cross-version compatibility. -->
<rule ref="PHPCompatibility"/>
<!-- Set minimum supported PHP version -->
<config name="testVersion" value="7.4-"/>
<!-- Whitelist the WP Core admin actions to prevent false positives -->
<rule ref="WordPress.WP.GlobalVariablesOverride">
<exclude-pattern>*/admin/*</exclude-pattern>
</rule>
<!-- Allow plugin file header -->
<rule ref="Squiz.Commenting.FileComment">
<exclude-pattern>*/wordpress-plugin-boilerplate.php</exclude-pattern>
</rule>
</ruleset>