-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathphpcs.xml.dist
More file actions
46 lines (38 loc) · 1.63 KB
/
phpcs.xml.dist
File metadata and controls
46 lines (38 loc) · 1.63 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
<?xml version="1.0"?>
<ruleset name="Polylang translated table example">
<description>Coding standards for Polylang translated table example</description>
<arg value="ps"/><!-- Shows progress. -->
<arg name="colors"/><!-- Shows results with colors. -->
<arg name="extensions" value="php"/><!-- Limits to PHP files. -->
<!-- https://github.com/squizlabs/PHP_CodeSniffer/wiki/Usage -->
<file>.</file>
<!-- Our own ruleset. -->
<rule ref="Polylang">
<exclude name="Generic.Commenting.DocComment.MissingShort"/>
<exclude name="PEAR.Commenting.FileComment.MissingVersion"/>
<exclude name="Squiz.NamingConventions.ValidFunctionName.ScopeNotCamelCaps"/>
<exclude name="Squiz.PHP.GlobalKeyword.NotAllowed"/>
<exclude name="WordPress.DB.DirectDatabaseQuery.DirectQuery"/>
</rule>
<!-- Run against the PHPCompatibility ruleset: PHP 5.6 and higher + WP 5.8 and higher. -->
<config name="testVersion" value="5.6-"/>
<config name="minimum_supported_wp_version" value="5.8"/>
<!-- Run against the PSR-4 ruleset. -->
<!-- https://github.com/suin/phpcs-psr4-sniff -->
<arg name="basepath" value="."/>
<rule ref="WordPress.WP.I18n">
<properties>
<property name="text_domain" type="array">
<element value="polylang-translated-table-example"/>
</property>
</properties>
</rule>
<rule ref="WordPress.DB.DirectDatabaseQuery.NoCaching">
<exclude-pattern>src/EventsTable.php</exclude-pattern>
<exclude-pattern>src/Table.php</exclude-pattern>
</rule>
<rule ref="WordPress.DB.DirectDatabaseQuery.SchemaChange">
<exclude-pattern>src/EventsTable.php</exclude-pattern>
<exclude-pattern>src/Table.php</exclude-pattern>
</rule>
</ruleset>