-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathphpcs.xml.dist
More file actions
62 lines (53 loc) · 2.09 KB
/
Copy pathphpcs.xml.dist
File metadata and controls
62 lines (53 loc) · 2.09 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
<?xml version="1.0"?>
<ruleset name="OutPost">
<description>Coding standards for the OutPost plugin.</description>
<file>.</file>
<exclude-pattern>/vendor/*</exclude-pattern>
<exclude-pattern>/tests/*</exclude-pattern>
<exclude-pattern>/blocks/*/editor.js</exclude-pattern>
<arg name="extensions" value="php"/>
<arg name="basepath" value="."/>
<arg name="colors"/>
<arg value="ps"/>
<arg name="parallel" value="8"/>
<!-- Fail CI on errors; warnings are reported but non-blocking. -->
<config name="ignore_warnings_on_exit" value="1"/>
<!-- WordPress-Extra: correctness, security, and naming. We keep the security
and correctness sniffs and relax the heavy documentation/formatting sniffs
that would require rewriting every docblock in an existing codebase. -->
<rule ref="WordPress-Extra">
<exclude name="Squiz.Commenting"/>
<exclude name="Generic.Commenting"/>
<exclude name="WordPress.PHP.YodaConditions"/>
<exclude name="Universal.Operators.DisallowShortTernary"/>
<exclude name="WordPress.WP.I18n.MissingTranslatorsComment"/>
<exclude name="Generic.CodeAnalysis.UnusedFunctionParameter"/>
<exclude name="WordPress.Files.FileName"/>
</rule>
<!-- PHP version floor (matches Requires PHP). -->
<config name="testVersion" value="8.2-"/>
<rule ref="PHPCompatibilityWP"/>
<!-- Plugin text domain. -->
<rule ref="WordPress.WP.I18n">
<properties>
<property name="text_domain" type="array">
<element value="outpost"/>
</property>
</properties>
</rule>
<!-- Global prefixes used by the plugin. -->
<rule ref="WordPress.NamingConventions.PrefixAllGlobals">
<properties>
<property name="prefixes" type="array">
<element value="outpost"/>
<element value="OUTPOST"/>
</property>
</properties>
</rule>
<!-- Template and view files run in the scope of their including method, so
their local variables are not truly global; don't flag them. -->
<rule ref="WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound">
<exclude-pattern>/templates/*</exclude-pattern>
<exclude-pattern>/admin/views/*</exclude-pattern>
</rule>
</ruleset>