-
Notifications
You must be signed in to change notification settings - Fork 9
/
phpcs.xml
65 lines (54 loc) · 2.97 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
56
57
58
59
60
61
62
63
64
65
<?xml version="1.0"?>
<ruleset name="The SEO Framework">
<description>The coding standard used for The SEO Framework plugin for WordPress.</description>
<!-- Get it here: https://github.com/theseoframework/wpcs-tsf -->
<rule ref="TSF"/>
<config name="minimum_supported_wp_version" value="5.1"/>
<config name="testVersion" value="5.6-"/>
<rule ref="TSF.Performance.Opcodes">
<properties>
<!-- <property name="userNoopChecks" type="array" value="_can_load,_load_trait,_has_run,_bootstrap_timer,Load,Silencer"/> -->
<property name="userNoopChecks" type="array" value="can_do_extension_settings,can_do_manager_settings,can_do_settings,_load_trait,_load_wp_compat,_bootstrap_timer,extension_basename,extension_dir_path,extension_dir_url,is_done,has_run,load_upgrader,get_ajax_notice,convert_markdown,do_dismissible_notice,is_headless,redirect,sanitize_metadata_content,clamp_sentence,make_info,make_data_attributes,make_single_select_form,get_image_uploader_form,sitemap_registry"/>
</properties>
</rule>
<rule ref="PHPCompatibilityWP">
<!-- We provide forward compatibility. -->
<exclude name="PHPCompatibility.Constants.NewConstants.php_int_minFound"/>
</rule>
<rule ref="WordPress.WP.I18n">
<properties>
<property name="text_domain" type="array" value="the-seo-framework-extension-manager,autodescription,default"/>
</properties>
</rule>
<rule ref="WordPress.NamingConventions.ValidVariableName">
<properties>
<!-- these values are prefixed with an underscore... which they strip during assertion =.= -->
<!-- <property name="customPropertiesWhitelist" type="array" value="_MAIN,_OPTIONS"/> -->
<property name="customPropertiesWhitelist" type="array" value="MAIN,OPTIONS"/>
</properties>
</rule>
<rule ref="VariableAnalysis.CodeAnalysis.VariableAnalysis">
<properties>
<!-- Discrepancy. Separation by \s+ -->
<property name="validUndefinedVariableNames" type="string" value="this _secret _instance bits"/>
</properties>
</rule>
<rule ref="WordPress.Security.EscapeOutput">
<properties>
<!-- Custom list of functions whose return values are pre-escaped for output. Doesn't work, as we need $this... -->
<!-- see https://github.com/WordPress/WordPress-Coding-Standards/issues/1766 -->
<!-- Should they add `if ( \T_THIS === $this->tokens[ $ptr ]['code'] ) continue;` at `OutputNotEscaped`? -->
<!-- <property name="customAutoEscapedFunctions" type="array" value=""/> -->
<!-- Custom list of functions which print output incorporating the passed values. -->
<!-- <property name="customPrintingFunctions" type="array" value=""/> -->
</properties>
</rule>
<!-- Exclude minified scripts. -->
<exclude-pattern>*.min.js</exclude-pattern>
<exclude-pattern>*.min.css</exclude-pattern>
<!-- Exclude index.php files. They are inert in (our) plugins unless directly included/called. -->
<exclude-pattern>index.php</exclude-pattern>
<!-- Check all PHP files in directory tree by default. -->
<arg name="extensions" value="php"/>
<file>.</file>
</ruleset>