mirror of
https://ghproxy.net/https://github.com/wp-cli/i18n-command.git
synced 2025-08-20 22:55:11 +08:00
PHPCS: add a ruleset for this project
The file is completely documented in-line.
This commit is contained in:
parent
69b3e25cd3
commit
62f155d4ca
1 changed files with 58 additions and 0 deletions
58
phpcs.xml.dist
Normal file
58
phpcs.xml.dist
Normal file
|
@ -0,0 +1,58 @@
|
|||
<?xml version="1.0"?>
|
||||
<ruleset name="WP-CLI-i18n">
|
||||
<description>Custom ruleset for WP-CLI I18n-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>
|
||||
|
||||
<!-- Ignoring select files/folders.
|
||||
https://github.com/squizlabs/PHP_CodeSniffer/wiki/Advanced-Usage#ignoring-files-and-folders -->
|
||||
<exclude-pattern>*/tests/data/*</exclude-pattern>
|
||||
|
||||
<!-- 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="5.4-"/>
|
||||
|
||||
<!-- 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\I18n"/><!-- Namespaces. -->
|
||||
<element value="wpcli_i18n"/><!-- Global variables and such. -->
|
||||
</property>
|
||||
</properties>
|
||||
</rule>
|
||||
|
||||
</ruleset>
|
Loading…
Add table
Add a link
Reference in a new issue