2016-08-27 14:18:14 +00:00
|
|
|
<?xml version="1.0"?>
|
|
|
|
<ruleset name="WordPress Coding Standards">
|
2017-09-27 16:07:41 +00:00
|
|
|
<description>WooCommerce dev PHP_CodeSniffer ruleset.</description>
|
2016-08-27 14:18:14 +00:00
|
|
|
|
2019-12-18 13:26:36 +00:00
|
|
|
<file>.</file>
|
|
|
|
|
2017-11-09 18:32:04 +00:00
|
|
|
<!-- Exclude paths -->
|
|
|
|
<exclude-pattern>tests/cli/</exclude-pattern>
|
|
|
|
<exclude-pattern>includes/libraries/</exclude-pattern>
|
2018-03-07 21:48:56 +00:00
|
|
|
<exclude-pattern>includes/legacy/</exclude-pattern>
|
2017-11-09 18:32:04 +00:00
|
|
|
<exclude-pattern>includes/api/legacy/</exclude-pattern>
|
2017-11-28 20:16:45 +00:00
|
|
|
<exclude-pattern>includes/api/v1/</exclude-pattern>
|
2018-03-15 20:23:40 +00:00
|
|
|
<exclude-pattern>includes/class-wc-geo-ip.php</exclude-pattern>
|
2018-03-07 21:48:56 +00:00
|
|
|
<exclude-pattern>includes/wc-deprecated-functions.php</exclude-pattern>
|
2017-11-21 12:41:55 +00:00
|
|
|
<exclude-pattern>*/node_modules/*</exclude-pattern>
|
|
|
|
<exclude-pattern>*/vendor/*</exclude-pattern>
|
2017-11-09 18:32:04 +00:00
|
|
|
|
2019-12-18 13:26:36 +00:00
|
|
|
<!-- Show progress, show the error codes for each message (source). -->
|
2019-12-20 15:46:57 +00:00
|
|
|
<arg value="ps" />
|
2019-12-18 13:26:36 +00:00
|
|
|
|
2019-12-20 12:09:14 +00:00
|
|
|
<!-- Strip the filepaths in reports down to the relevant bit. -->
|
2019-12-20 15:46:57 +00:00
|
|
|
<arg name="basepath" value="./" />
|
2019-12-18 13:26:36 +00:00
|
|
|
|
|
|
|
<!-- Check up to 8 files simultaneously. -->
|
2019-12-20 15:46:57 +00:00
|
|
|
<arg name="parallel" value="8" />
|
2019-12-18 13:26:36 +00:00
|
|
|
|
2017-11-21 12:41:55 +00:00
|
|
|
<!-- Configs -->
|
2019-12-18 13:18:53 +00:00
|
|
|
<config name="minimum_supported_wp_version" value="5.0" />
|
2020-04-07 00:07:33 +00:00
|
|
|
<config name="testVersion" value="7.0-" />
|
2017-11-21 12:41:55 +00:00
|
|
|
|
2017-11-21 12:47:42 +00:00
|
|
|
<!-- Rules -->
|
2017-12-21 23:29:49 +00:00
|
|
|
<rule ref="WooCommerce-Core" />
|
2017-11-09 18:32:04 +00:00
|
|
|
|
2017-11-21 12:41:55 +00:00
|
|
|
<rule ref="WordPress.WP.I18n">
|
|
|
|
<properties>
|
|
|
|
<property name="text_domain" type="array" value="woocommerce" />
|
|
|
|
</properties>
|
|
|
|
</rule>
|
2018-11-06 22:58:50 +00:00
|
|
|
|
|
|
|
<rule ref="PHPCompatibility">
|
|
|
|
<exclude-pattern>tests/</exclude-pattern>
|
|
|
|
</rule>
|
|
|
|
|
2017-11-27 12:57:16 +00:00
|
|
|
<rule ref="WordPress.Files.FileName.InvalidClassFileName">
|
|
|
|
<exclude-pattern>includes/**/abstract-*.php</exclude-pattern>
|
2018-01-15 17:02:39 +00:00
|
|
|
<exclude-pattern>tests/*</exclude-pattern>
|
2019-06-25 12:13:04 +00:00
|
|
|
<exclude-pattern>src/*</exclude-pattern>
|
2017-11-27 12:57:16 +00:00
|
|
|
</rule>
|
2018-11-06 22:58:50 +00:00
|
|
|
|
2018-01-22 03:23:48 +00:00
|
|
|
<rule ref="Generic.Commenting">
|
|
|
|
<exclude-pattern>tests/</exclude-pattern>
|
|
|
|
</rule>
|
2018-11-06 22:58:50 +00:00
|
|
|
|
2018-01-22 03:42:05 +00:00
|
|
|
<rule ref="PEAR.Functions.FunctionCallSignature.EmptyLine">
|
|
|
|
<exclude-pattern>tests/e2e-tests/</exclude-pattern>
|
|
|
|
</rule>
|
2018-03-06 11:08:28 +00:00
|
|
|
|
2018-03-06 13:32:56 +00:00
|
|
|
<rule ref="WordPress.Files.FileName.NotHyphenatedLowercase">
|
|
|
|
<exclude-pattern>i18n/</exclude-pattern>
|
2019-06-25 12:13:04 +00:00
|
|
|
<exclude-pattern>src/</exclude-pattern>
|
2018-03-06 13:32:56 +00:00
|
|
|
</rule>
|
2016-08-27 14:18:14 +00:00
|
|
|
</ruleset>
|