forked from johnbillion/query-monitor
-
Notifications
You must be signed in to change notification settings - Fork 0
/
phpcs.xml.dist
79 lines (62 loc) · 3.04 KB
/
phpcs.xml.dist
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
72
73
74
75
76
77
78
79
<?xml version="1.0"?>
<ruleset name="Query Monitor">
<config name="testVersion" value="7.4-"/>
<arg name="extensions" value="php"/>
<!--
Prevent deprecated errors caused by WordPress Coding Standards not supporting PHP 8.0+.
See https://github.com/WordPress/WordPress-Coding-Standards/issues/2035
-->
<ini name="error_reporting" value="E_ALL & ~E_DEPRECATED" />
<exclude-pattern>/build/*</exclude-pattern>
<exclude-pattern>/node_modules/*</exclude-pattern>
<exclude-pattern>/tests/*</exclude-pattern>
<exclude-pattern>/vendor/*</exclude-pattern>
<rule ref="WordPress-Extra">
<exclude name="WordPress.Files.FileName" />
<!-- Exclude short description sniff so short `@var` notation can be used -->
<exclude name="Generic.Commenting.DocComment.MissingShort"/>
<!-- QM is a debugging plugin, so silence warnings about usage of development functionality -->
<exclude name="WordPress.PHP.DevelopmentFunctions.error_log_debug_backtrace" />
<exclude name="WordPress.PHP.DevelopmentFunctions.error_log_trigger_error" />
<exclude name="WordPress.PHP.DevelopmentFunctions.error_log_set_error_handler" />
<exclude name="WordPress.PHP.DevelopmentFunctions.error_log_print_r" />
<exclude name="WordPress.PHP.DevelopmentFunctions.prevent_path_disclosure_error_reporting" />
<exclude name="WordPress.PHP.DiscouragedPHPFunctions.runtime_configuration_error_reporting" />
<exclude name="WordPress.PHP.DiscouragedPHPFunctions.runtime_configuration_ini_set" />
<exclude name="WordPress.PHP.IniSet.display_errors_Blacklisted" />
<exclude name="WordPress.DB.RestrictedFunctions" />
<!-- @TODO remove this exclusion: -->
<exclude name="Squiz.Commenting" />
<!-- Not interested in whitespace issues at the moment -->
<exclude name="PEAR.Functions.FunctionCallSignature" />
<exclude name="Generic.Functions.FunctionCallArgumentSpacing.TooMuchSpaceAfterComma" />
<exclude name="Generic.WhiteSpace.ScopeIndent.Incorrect" />
<exclude name="Generic.WhiteSpace.ScopeIndent.IncorrectExact" />
<exclude name="Generic.Formatting.MultipleStatementAlignment.NotSameWarning" />
<exclude name="Generic.Formatting.MultipleStatementAlignment.IncorrectWarning" />
<exclude name="WordPress.Arrays.MultipleStatementAlignment.DoubleArrowNotAligned" />
<!-- We have the means -->
<exclude name="WordPress.PHP.YodaConditions.NotYoda" />
<exclude name="WordPress.PHP.DisallowShortTernary.Found" />
<!-- QM looks at several superglobals -->
<exclude name="WordPress.Security.NonceVerification.Missing" />
</rule>
<rule ref="WordPress-Docs" />
<!-- Custom rule properties -->
<rule ref="WordPress.WP.I18n">
<properties>
<property name="text_domain" type="array" value="query-monitor" />
</properties>
</rule>
<rule ref="WordPress.WP.DeprecatedFunctions">
<properties>
<property name="minimum_supported_version" value="5.8" />
</properties>
</rule>
<rule ref="WordPress.NamingConventions.ValidHookName">
<properties>
<property name="additionalWordDelimiters" value="-/"/>
</properties>
</rule>
<rule ref="PHPCompatibilityWP"/>
</ruleset>