forked from greenpeace/planet4-plugin-gutenberg-blocks
-
Notifications
You must be signed in to change notification settings - Fork 0
/
phpcs.xml
55 lines (45 loc) · 1.86 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
46
47
48
49
50
51
52
53
54
55
<?xml version="1.0"?>
<ruleset name="WordPress Coding Standards for Plugins">
<description>Generally-applicable sniffs for WordPress plugins</description>
<rule ref="WordPress-Core"/>
<rule ref="WordPress-Docs">
<exclude name="Generic.Commenting.DocComment.MissingShort"/>
</rule>
<rule ref="WordPress-Extra"/>
<rule ref="WordPress.NamingConventions.ValidVariableName">
<properties>
<property name="customPropertiesWhitelist" type="array" value="nextSibling,nodeName,nodeValue"/>
</properties>
</rule>
<!-- Add rule for plugin's textdomains -->
<rule ref="WordPress.WP.I18n">
<properties>
<property name="text_domain" type="array" value="planet4-blocks,planet4-blocks-backend,planet4-engagingnetworks,planet4-engagingnetworks-backend"/>
</properties>
</rule>
<!-- Whitelist p4 test classes for filename sniffs. -->
<rule ref="WordPress.Files.FileName">
<properties>
<property name="custom_test_class_whitelist" type="array" value="P4_UnitTestCase,WP_UnitTest_Factory_For_Term"/>
</properties>
</rule>
<rule ref="WordPress.WP.PostsPerPage">
<properties>
<property name="posts_per_page" value="100"/>
</properties>
</rule>
<rule ref="Generic.Arrays.DisallowLongArraySyntax.Found">
<type>error</type>
</rule>
<rule ref="Generic.Arrays">
<exclude name="Generic.Arrays.DisallowShortArraySyntax"/>
</rule>
<!-- 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-pattern>*/node_modules/*</exclude-pattern>
<exclude-pattern>*/vendor/*</exclude-pattern>
<exclude-pattern>*/tests/acceptance/*</exclude-pattern>
</ruleset>