forked from lipemat/wordpress-libs
-
Notifications
You must be signed in to change notification settings - Fork 1
/
phpcs.xml
49 lines (42 loc) · 2 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
<?xml version="1.0"?>
<ruleset name="WordPress Coding Standards">
<!-- See https://github.com/squizlabs/PHP_CodeSniffer/wiki/Annotated-ruleset.xml -->
<!-- See https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards -->
<!-- See https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/blob/develop/WordPress-Core/ruleset.xml -->
<description>WordPress Libs Rule Set.</description>
<!-- Include when not specified -->
<file>./src</file>
<!-- sniff both PHP and JS -->
<arg name="extensions" value="php/PHP"/>
<!-- Show sniff codes in all reports, and progress when running -->
<arg value="snp"/>
<!-- Exclude paths -->
<exclude-pattern>*/dev/*</exclude-pattern>
<config name="minimum_supported_wp_version" value="5.5" />
<!-- @see https://github.com/wimg/PHPCompatibility#sniffing-your-code-for-compatibility-with-specific-php-versions -->
<config name="testVersion" value="7.3-"/>
<!-- @see https://github.com/PHPCompatibility/PHPCompatibilityWP#how-to-use -->
<rule ref="PHPCompatibilityWP"/>
<rule ref="WordPress">
<exclude name="WordPress.Variables.GlobalVariables.OverrideProhibited" />
<exclude name="WordPress.Files.FileName.InvalidClassFileName" />
<exclude name="WordPress.Files.FileName.NotHyphenatedLowercase" />
<exclude name="WordPress.NamingConventions.ValidFunctionName.MethodNameInvalid" />
<exclude name="WordPress.NamingConventions.ValidHookName.UseUnderscores" />
<exclude name="WordPress.PHP.DisallowShortTernary.Found" />
<exclude name="Generic" />
<exclude name="Squiz" />
</rule>
<rule ref="WordPress.Security.ValidatedSanitizedInput">
<properties>
<property name="customUnslashingSanitizingFunctions" type="array">
<element value="wp_verify_nonce" />
</property>
</properties>
</rule>
<rule ref="WordPress.WP.I18n">
<properties>
<property name="text_domain" type="array" value="lipe" />
</properties>
</rule>
</ruleset>