This repository has been archived by the owner on Jul 23, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathphpcs.xml
45 lines (35 loc) · 1.68 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
44
45
<?xml version="1.0"?>
<ruleset name="OM4 WordPress" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="./vendor/squizlabs/php_codesniffer/phpcs.xsd">
<description>OM4 Coding Standards for WordPress projects</description>
<!-- Define files to check -->
<file>.</file>
<!-- Exclude from test -->
<exclude-pattern>./vendor</exclude-pattern>
<!-- command-line config -->
<arg value="ps" />
<arg name="extensions" value="php" />
<!-- Include all rules from WordPress standard -->
<rule ref="WordPress">
<exclude name="WordPress.Files.FileName" />
<exclude name="WordPress.Security.EscapeOutput.OutputNotEscaped" />
<exclude name="WordPress.Security.NonceVerification.Recommended" />
<exclude name="WordPress.WP.EnqueuedResources" />
<exclude name="Universal.Files.SeparateFunctionsFromOO.Mixed" />
</rule>
<!-- Set supported WP version same as the plugin itself -->
<config name="minimum_supported_wp_version" value="6.2" />
<!-- Include all rules from phpcompatibility/phpcompatibility-wp -->
<rule ref="PHPCompatibilityWP" />
<!-- Set supported PHP version same as the plugin itself -->
<config name="testVersion" value="7.4-" />
<!-- Include Commenting rules from Squiz standard -->
<rule ref="Squiz.Commenting">
<!-- Change from error to warning -->
<type>warning</type>
<!-- Remove specific commenting rules -->
<exclude name="Squiz.Commenting.FileComment" />
<exclude name="Squiz.Commenting.FunctionComment.Missing" />
<exclude name="Squiz.Commenting.LongConditionClosingComment" />
</rule>
</ruleset>