Improve PHPCS configuration

This commit implements the following changes to PHPCS execution via its configuration file:

- Show progress while it is running
- Improves performance by checking up to 8 files simultaneously
- Display only the relevant bit of filepaths when showing error and warnings
This commit is contained in:
Rodrigo Primo 2019-12-18 10:26:36 -03:00
parent ceaab9fdc0
commit 6734662cbb
1 changed files with 11 additions and 0 deletions

View File

@ -2,6 +2,8 @@
<ruleset name="WordPress Coding Standards">
<description>WooCommerce dev PHP_CodeSniffer ruleset.</description>
<file>.</file>
<!-- Exclude paths -->
<exclude-pattern>tests/cli/</exclude-pattern>
<exclude-pattern>includes/libraries/</exclude-pattern>
@ -13,6 +15,15 @@
<exclude-pattern>*/node_modules/*</exclude-pattern>
<exclude-pattern>*/vendor/*</exclude-pattern>
<!-- Show progress, show the error codes for each message (source). -->
<arg value="ps"/>
<!-- Strip the filepaths down to the relevant bit. -->
<arg name="basepath" value="./"/>
<!-- Check up to 8 files simultaneously. -->
<arg name="parallel" value="8"/>
<!-- Configs -->
<config name="minimum_supported_wp_version" value="5.0" />
<config name="testVersion" value="5.6-" />