Skip to content

Implement CS checking based on the WP_CLI_CS ruleset#41

Merged
schlessera merged 5 commits intowp-cli:masterfrom
jrfnl:feature/use-phpcs
Apr 20, 2019
Merged

Implement CS checking based on the WP_CLI_CS ruleset#41
schlessera merged 5 commits intowp-cli:masterfrom
jrfnl:feature/use-phpcs

Conversation

@jrfnl
Copy link
Copy Markdown
Contributor

@jrfnl jrfnl commented Apr 20, 2019

This adds a PHPCS ruleset using the new WP_CLI_CS standard and fixes tow minor infractions.

Please see the individual commits for more detail.

Fixes #39

Related to wp-cli/wp-cli#5179

jrfnl added 5 commits April 20, 2019 18:24
... as that version contains the new WPCliCS PHPCS standard.
* `.distignore`: no need to distribute the phpcs/phpunit config files.
* `.gitignore`: Allow devs to overwrite config files for PHPUnit and PHPCS
    - The `.dist` files should be committed. However, for their personal use, devs can  overrule those files with versions without `.dist`.
        Those personal versions should never be committed.

As a side-note: for PHPCS, having a personal version while still using the original  `.dist` file is made very easy, as you can just import the `.dist` file as a starting  point, like so:
```xml
<?xml version="1.0"?>
<ruleset name="WP-CLI">
    <rule ref="./phpcs.xml.dist"/>
</ruleset>
```
The file is completely documented in-line.
@jrfnl jrfnl requested a review from a team as a code owner April 20, 2019 16:29
@schlessera schlessera added the scope:testing Related to testing label Apr 20, 2019
@schlessera schlessera added this to the 2.0.3 milestone Apr 20, 2019
@schlessera schlessera merged commit 47a4f1a into wp-cli:master Apr 20, 2019
@jrfnl jrfnl deleted the feature/use-phpcs branch April 20, 2019 18:30
@schlessera schlessera modified the milestones: 2.0.3, 2.0.4 Apr 21, 2019
schlessera added a commit that referenced this pull request Jan 5, 2022
Implement CS checking based on the `WP_CLI_CS` ruleset
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope:testing Related to testing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Adopt and enforce new WP_CLI_CS standard

2 participants