Adopt and enforce new `WP_CLI_CS` standard
schlessera opened this issue · 0 comments
schlessera commented
We have a new PHPCS standard for WP-CLI called WPCliCS
(props @jrfnl). It is part of the wp-cli/wp-cli-tests
package starting with version v2.1.0.
To adopt & enforce this new standard, the following actions need to be taken for this repository:
-
Create a PR that adds a custom ruleset
phpcs.xml.dist
to the repository- Add
phpcs.xml.dist
file - Adapt
.distignore
to ignorephpcs.xml.dist
&phpunit.xml.dist
- Adapt
.gitignore
to ignorephpunit.xml
,phpcs.xml
&.phpcs.xml
- Require version
^2.1
of thewp-cli/wp-cli-tests
as a dev dependency
- Add
-
Make any required changes to the code that fail the checks from the above ruleset in separate PRs
-
Merge thre ruleset once all required changes have been processed and merged
A sample PR for a simple repository can be seen here: https://github.com/wp-cli/maintenance-mode-command/pull/3/files
Related wp-cli/wp-cli#5179