This repository was 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
Expand file tree
/
Copy pathphpcs.xml
More file actions
73 lines (61 loc) · 2.79 KB
/
phpcs.xml
File metadata and controls
73 lines (61 loc) · 2.79 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
<?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>
<exclude-pattern>./includes/scssphp</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.ExceptionNotEscaped" />
<exclude name="WordPress.Security.EscapeOutput.OutputNotEscaped" />
<exclude name="WordPress.Security.NonceVerification.Recommended" />
<exclude name="WordPress.WP.EnqueuedResources" />
<exclude name="Universal.Files.SeparateFunctionsFromOO.Mixed" />
<exclude name="Universal.Arrays.DisallowShortArraySyntax" />
</rule>
<!-- Set supported WP version same as the plugin itself -->
<config name="minimum_supported_wp_version" value="6.2" />
<!-- Set text domain to enable checking -->
<rule ref="WordPress.WP.I18n">
<properties>
<property name="text_domain" type="array">
<element value="om4-custom-css" />
</property>
</properties>
</rule>
<!-- 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" />
<!-- Exclude rules from tests -->
<exclude-pattern>./tests/*</exclude-pattern>
</rule>
<!-- Exclude specific rules from tests -->
<rule ref="Generic.Commenting.DocComment.MissingShort">
<exclude-pattern>./tests/*</exclude-pattern>
</rule>
<rule ref="Squiz.Commenting.FunctionComment.MissingParamTag">
<exclude-pattern>./tests/*</exclude-pattern>
</rule>
<rule ref="WordPress.WP.AlternativeFunctions">
<exclude-pattern>./tests/*</exclude-pattern>
</rule>
<rule ref="Generic.CodeAnalysis.UnusedFunctionParameter.FoundAfterLastUsed">
<exclude-pattern>./tests/*</exclude-pattern>
</rule>
</ruleset>