mirror of
https://hk.gh-proxy.com/https://github.com/wp-cli/profile-command.git
synced 2025-08-18 06:11:32 +08:00
60 lines
2.2 KiB
XML
60 lines
2.2 KiB
XML
<?xml version="1.0"?>
|
|
<ruleset name="WP-CLI-profile">
|
|
<description>Custom ruleset for WP-CLI profile-command</description>
|
|
|
|
<!--
|
|
#############################################################################
|
|
COMMAND LINE ARGUMENTS
|
|
For help understanding this file: https://github.com/squizlabs/PHP_CodeSniffer/wiki/Annotated-ruleset.xml
|
|
For help using PHPCS: https://github.com/squizlabs/PHP_CodeSniffer/wiki/Usage
|
|
#############################################################################
|
|
-->
|
|
|
|
<!-- What to scan. -->
|
|
<file>.</file>
|
|
|
|
<!-- Show progress. -->
|
|
<arg value="p"/>
|
|
|
|
<!-- Strip the filepaths down to the relevant bit. -->
|
|
<arg name="basepath" value="./"/>
|
|
|
|
<!-- Check up to 8 files simultaneously. -->
|
|
<arg name="parallel" value="8"/>
|
|
|
|
<!--
|
|
#############################################################################
|
|
USE THE WP_CLI_CS RULESET
|
|
#############################################################################
|
|
-->
|
|
|
|
<rule ref="WP_CLI_CS"/>
|
|
|
|
<!--
|
|
#############################################################################
|
|
PROJECT SPECIFIC CONFIGURATION FOR SNIFFS
|
|
#############################################################################
|
|
-->
|
|
|
|
<!-- For help understanding the `testVersion` configuration setting:
|
|
https://github.com/PHPCompatibility/PHPCompatibility#sniffing-your-code-for-compatibility-with-specific-php-versions -->
|
|
<config name="testVersion" value="7.2-"/>
|
|
|
|
<!-- Verify that everything in the global namespace is either namespaced or prefixed.
|
|
See: https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/wiki/Customizable-sniff-properties#naming-conventions-prefix-everything-in-the-global-namespace -->
|
|
<rule ref="WordPress.NamingConventions.PrefixAllGlobals">
|
|
<properties>
|
|
<property name="prefixes" type="array">
|
|
<element value="WP_CLI\Profile"/><!-- Namespaces. -->
|
|
<element value="wpcli_profile"/><!-- Global variables and such. -->
|
|
</property>
|
|
</properties>
|
|
<exclude name="WordPress.Files.FileName.NotHyphenatedLowercase" />
|
|
<exclude-pattern>*/src/*.php$</exclude-pattern>
|
|
</rule>
|
|
|
|
<rule ref="WordPress.PHP.NoSilencedErrors.Discouraged">
|
|
<exclude-pattern>*/src/class-profiler.php$</exclude-pattern>
|
|
</rule>
|
|
|
|
</ruleset>
|