Repository navigation
Expand file tree
/
Copy pathphpcs.xml.dist
More file actions
71 lines (63 loc) · 2.67 KB
/
Copy pathphpcs.xml.dist
File metadata and controls
71 lines (63 loc) · 2.67 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
<?xml version="1.0"?>
<ruleset name="AllFeedback">
<description>All Feedback WordPress Plugin Coding Standards</description>
<!-- What to scan -->
<file>.</file>
<!-- Exclusions -->
<exclude-pattern>*/vendor/*</exclude-pattern>
<exclude-pattern>*/node_modules/*</exclude-pattern>
<exclude-pattern>*/resources/build/*</exclude-pattern>
<exclude-pattern>*.js</exclude-pattern>
<exclude-pattern>*.css</exclude-pattern>
<!-- Output settings -->
<arg value="ps"/>
<arg name="parallel" value="20"/>
<arg name="colors"/>
<arg name="basepath" value="./"/>
<!-- Base standard -->
<rule ref="WordPress-Extra">
<!-- Allow short array syntax [] -->
<exclude name="Generic.Arrays.DisallowShortArraySyntax"/>
<exclude name="Universal.Arrays.DisallowShortArraySyntax"/>
<!-- Allow modern alignment -->
<exclude name="WordPress.Arrays.MultipleStatementAlignment"/>
<!-- Don't require Yoda conditions -->
<exclude name="WordPress.PHP.YodaConditions"/>
<!--
PSR-12 class methods use camelCase (getContainer, registerRoutes, addAction…).
Renaming them to snake_case would shadow WP globals (add_action, add_filter)
and break PSR-12 OOP conventions. Class-method naming is opt-out here.
-->
<exclude name="WordPress.NamingConventions.ValidFunctionName.MethodNameInvalid"/>
</rule>
<!-- Documentation standard -->
<rule ref="WordPress-Docs"/>
<rule ref="Squiz.Commenting.FunctionComment"/>
<rule ref="Squiz.Commenting.ClassComment"/>
<!-- Enforce the plugin's text domain -->
<rule ref="WordPress.WP.I18n">
<properties>
<property name="text_domain" type="array">
<element value="allfeedback"/>
</property>
</properties>
</rule>
<!-- Enforce the plugin's global prefix; "af" is intentionally short for internal use -->
<rule ref="WordPress.NamingConventions.PrefixAllGlobals">
<properties>
<property name="prefixes" type="array">
<element value="af"/>
<element value="allfeedback"/>
<element value="AllFeedback"/>
</property>
</properties>
<exclude name="WordPress.NamingConventions.PrefixAllGlobals.ShortPrefixPassed"/>
</rule>
<!-- PSR-4 class filenames use PascalCase — exclude WP's hyphenated-lowercase rule -->
<rule ref="WordPress.Files.FileName">
<properties>
<property name="strict_class_file_names" value="false"/>
</properties>
<exclude name="WordPress.Files.FileName.NotHyphenatedLowercase"/>
</rule>
</ruleset>