You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
80 lines
3.0 KiB
80 lines
3.0 KiB
<?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.7" />
|
|
</properties>
|
|
</rule>
|
|
|
|
<rule ref="WordPress.NamingConventions.ValidHookName">
|
|
<properties>
|
|
<property name="additionalWordDelimiters" value="-/"/>
|
|
</properties>
|
|
</rule>
|
|
|
|
<rule ref="PHPCompatibilityWP"/>
|
|
|
|
</ruleset>
|